1

In fact I have the following configuration:

extrouter(192.168.1.1) <- wifi -> [eth2 (192.168.1.11) Centos 6/6 based host br0 (172.22.5.254)]

br0 contains two tap interfaces (tap0/172.22.5.1 tap1/172.22.5.2) from virtual machines (kvm), the gw inside VMs is 172.22.5.254.

If only a single virtual machine is connected to br0 all works well. I cant ping from VM 192.168.1.1 and tcpdump for eth2 shows 192.168.1.11 as outgoing address, masquerading works as expected. But if I add the second VM (the order of VMs are not important) the outgoing address changes to the 172.22.5.254. After removing one of VM from the bridge all goes back and starts working again.

Bridge has its own mac address, so adding an interface shouldn't change anything.

Any ideas what may be wrong?

Update 1

# brctl show br0
bridge name bridge id       STP enabled interfaces
br0         8000.026adbaf3564   no      tap0
                            tap1

# netstat -rn
Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
172.22.5.0      0.0.0.0         255.255.255.0   U         0 0          0 br0
192.168.1.0     0.0.0.0         255.255.255.0   U         0 0          0 eth2
192.168.122.0   0.0.0.0         255.255.255.0   U         0 0          0 virbr0
0.0.0.0         192.168.1.1     0.0.0.0         UG        0 0          0 eth2

Update 2

Now I see why I get such outgoing address:

POSTR: IN= OUT=br0 PHYSIN=tap0 PHYSOUT=tap1 SRC=172.22.5.1 DST=192.168.1.1 LEN=84 TOS=0x00 PREC=0x00 TTL=64 ID=0 DF PROTO=ICMP TYPE=8 CODE=0 ID=59404 SEQ=1 

It looks like routing issue. But where ...

  • Can you add a netstat -rn and brctl show br0 from that host? – ott-- Mar 1 '15 at 3:03
  • @ott--added. I've also tried to check what if I add veth chain to the bridge and move IP from bridge to the free side of the veth pipe and I was surprised that the packed on the pipe already nat-ed. It looks like that the system tries to nat the packed in the wrong point. One more thing. If I add the second tap to the bridge the ping from the first one still works till I stop it and start again. – loshad vtapkah Mar 1 '15 at 11:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.