kVM setup vm using 2 NIC's are not working

Hi Guys

I am facing some strange problem as using 2 nic’s on kvm child vm. Secondary interface eth1 is not working on vm but eth0 is working , i am using routing mode, here below details.

Start VM using 2 nics support using below command.

/usr/bin/qemu-kvm -M pc -m 256 -smp 1 -name myguest1 -uuid
5dcb91e1 -nographic -monitor
unix:/var/lib/libvirt/qemu/myguest1.monitor,server,nowait -boot c -drive
file=/dev/vmdata/vm.root,if=ide,index=0,boot=on -drive
file=/dev/vmdata/vm.var,if=ide,index=1 -drive
file=/dev/vmdata/vm.swap,if=ide,index=3 -net
nic,macaddr=52:54:00:ea:aa:fe,vlan=0,name=nic0 -net
tap,ifname=tap3,script=/etc/KVM/vm-tap3.sh,vlan=0,name=tap3 -net
nic,macaddr=52:54:00:a7:9b:c1,vlan=1,name=nic1 -net
tap,ifname=tap30,script=/etc/KVM/vm-tap30.sh,vlan=1,name=tap30 -serial pty
-parallel none -usb &

VM is started and ifconfig shows both eth0 and eth1 in child vm.

From KVM host, tap script using above add routes to desire ip. like

ip route add 11.11.11.11/32 dev tap3 (For eth0 on child VM guest)
ip route add 22.22.22.22/32 dev tap30 (For eth1 on child VM guest)

Ip forwarding is enabled, and i ensure no traffic is blocked.

Now when i ping eth0 ip (11.11.11.11) from outside or inside KVM host mother its working. But when i ping eth1 ip ( 22.22.22.22) from outside or even inside kvm mother its not working.

After some diagonse, i conclude below.

tcpdump on eth1 on child shows below.

17:05:55.213100 ARP, Request who-has 22.22.22.22 tell x.x.x.x, length 46
17:05:56.213493 ARP, Request who-has 22.22.22.22 tell x.x.x.xlength 46

As on kvm host, arp -e shows below.

[root@host ~]# arp -e
Address HWtype HWaddress Flags Mask Iface
x.x.x.x ether 52:54:00:56:40:56 C tap1
x.x.x.x (incomplete) tap30

As tap30 used by eth1 on child vm and tap1 used by eth0 on child vm. So its shows arp request not completed.

Above setup is working in past i see libvirt drop process capabilities for interface Ethernet, but above setup is still working f9 4 me using 1 interface eth0 but eth1 is not working.

Can you guys please suggest,

Thanks
Muzi
Reply With Quote

I think no one using kvm in routed mode ? :slight_smile: