|
From: | Xingbo Wu |
Subject: | Re: [Qemu-discuss] DHCP reply packet got dropped in bridged network |
Date: | Sat, 8 Nov 2014 13:44:15 -0500 |
It's been bothering me for days. Currently the setup is like this:two physical machines: (1) VM host (2) dhcp server running dnsmasq. Both are running archlinux with linux-3.17.2The host machine has two ethernet ports. a bonding interface is first set up and a bridge is built on the bonding interface. br0 ( bond0 (eth0 eth1)).The bridge is configured to use dhcp and the host networking works well.But when I attach VMs to this bridge, weird things began to happen. The guest uses kvm and virtio nic driver.part of the parameters:-net bridge,br=br0 -net nic,model=virtio,macaddr=52:54:00:00:01:01if I configure the guest to use static address, it works WELL. If it uses dhcp, it fails.After some investigation, I tried to set net.ipv4.ip_forward=1, net.*bridge*tables=0, etc.. via sysctl -w, nothing changed, accepting some iptable rules.. But it still made no difference.I tried to track the network packets with tcpdump. It shed some light on this:the bridge got the dhcp reply packet from the dhcp server:tcpdump -i br0 -vvv -ne '(port 67 or port 68)' on br0:17:18:51.824369 00:1b:21:09:de:ab > 52:54:00:00:01:01, ethertype IPv4 (0x0800), length 375: (tos 0xc0, ttl 64, id 40531, offset 0, flags [none], proto UDP (17), length 361)10.0.0.1.67 > 10.1.1.1.68: [udp sum ok] BOOTP/DHCP, Reply, length 333, xid 0x2c6b7e75, secs 4, Flags [none] (0x0000)Your-IP 10.1.1.1Server-IP 10.0.0.1Client-Ethernet-Address 52:54:00:00:01:01but on tap0, this packet never appeared, neigher in the VM.the bridge is set up by netctl. the stp is off on the bridge, it shows a forwarding delay of 15. I can't set it to 0, the minimal valid value is about 2.0.> brctl showstp br0br0bridge id 8000.001517ac834cdesignated root 8000.001517ac834croot port 0 path cost 0max age 19.99 bridge max age 19.99hello time 1.99 bridge hello time 1.99forward delay 14.99 bridge forward delay 14.99ageing time 299.99hello timer 1.59 tcn timer 0.00topology change timer 0.00 gc timer 20.78flagsbond0 (1)port id 8001 state forwardingdesignated root 8000.001517ac834c path cost 100designated bridge 8000.001517ac834c message age timer 0.00designated port 8001 forward delay timer 0.00designated cost 0 hold timer 0.59flagstap0 (2)port id 8002 state forwardingdesignated root 8000.001517ac834c path cost 100designated bridge 8000.001517ac834c message age timer 0.00designated port 8002 forward delay timer 0.00designated cost 0 hold timer 0.59flags--
[Prev in Thread] | Current Thread | [Next in Thread] |