I have a standard bridging setup between the real world and a KVM VM guest.
Bridging looks fine:
[root@t ~]# brctl show
bridge name bridge id STP enabled interfaces
br0 8000.40f2e9c6033d no eno2
vnet0
virbr0 8000.000000000000 no
The default gateway is br0 on the host.
I can ping the VM from the host and the host from the VM.
If I ping anything outside either from the VM or the host itself, I see intermittent packet loss:
[root@locoxen2 ~]# ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_seq=1 ttl=55 time=4.59 ms
64 bytes from 8.8.8.8: icmp_seq=2 ttl=55 time=4.59 ms
64 bytes from 8.8.8.8: icmp_seq=3 ttl=55 time=4.67 ms
64 bytes from 8.8.8.8: icmp_seq=4 ttl=55 time=4.75 ms
64 bytes from 8.8.8.8: icmp_seq=5 ttl=55 time=4.69 ms
64 bytes from 8.8.8.8: icmp_seq=15 ttl=55 time=1224 ms
64 bytes from 8.8.8.8: icmp_seq=16 ttl=55 time=224 ms
64 bytes from 8.8.8.8: icmp_seq=17 ttl=55 time=4.49 ms
64 bytes from 8.8.8.8: icmp_seq=18 ttl=55 time=4.48 ms
64 bytes from 8.8.8.8: icmp_seq=19 ttl=55 time=4.54 ms
64 bytes from 8.8.8.8: icmp_seq=20 ttl=55 time=4.52 ms
64 bytes from 8.8.8.8: icmp_seq=21 ttl=55 time=4.55 ms
64 bytes from 8.8.8.8: icmp_seq=22 ttl=55 time=4.70 ms
64 bytes from 8.8.8.8: icmp_seq=23 ttl=55 time=4.57 ms
64 bytes from 8.8.8.8: icmp_seq=24 ttl=55 time=4.88 ms
64 bytes from 8.8.8.8: icmp_seq=25 ttl=55 time=4.65 ms
64 bytes from 8.8.8.8: icmp_seq=26 ttl=55 time=4.53 ms
64 bytes from 8.8.8.8: icmp_seq=36 ttl=55 time=1430 ms
64 bytes from 8.8.8.8: icmp_seq=37 ttl=55 time=430 ms
64 bytes from 8.8.8.8: icmp_seq=38 ttl=55 time=4.57 ms
64 bytes from 8.8.8.8: icmp_seq=39 ttl=55 time=4.53 ms
This particularly happens if traffic is leaving the VM & host at the same time.
If I shutdown the VM (i.e. ensure no traffic from this side of the bridge), I see no packet loss if I ping from the host, as above.
Running tcpdump on the physical port (eno2) on the host whilst pinging from both host & VM at the same time shows me things like this (40:f2 is the host, 52:54 is the VM):
17:53:26.382679 40:f2:e9:c6:03:3d > e8:f7:24:49:49:ee, ethertype IPv4 (0x0800), length 98: 192.168.0.191 > 8.8.8.8: ICMP echo request, id 27485, seq 23, length 64
17:53:27.200397 52:54:00:16:f5:f4 > e8:f7:24:49:49:ee, ethertype IPv4 (0x0800), length 98: 192.168.0.221 > 8.8.8.8: ICMP echo request, id 11460, seq 2, length 64
17:53:27.382244 40:f2:e9:c6:03:3d > e8:f7:24:49:49:ee, ethertype IPv4 (0x0800), length 98: 192.168.0.191 > 8.8.8.8: ICMP echo request, id 27485, seq 24, length 64
17:53:28.200304 52:54:00:16:f5:f4 > e8:f7:24:49:49:ee, ethertype IPv4 (0x0800), length 98: 192.168.0.221 > 8.8.8.8: ICMP echo request, id 11460, seq 3, length 64
i.e. packets go out, but replies are never received.
The same, but with no traffic from the VM, or the VM is shutdown:
17:53:05.346226 40:f2:e9:c6:03:3d > e8:f7:24:49:49:ee, ethertype IPv4 (0x0800), length 98: 192.168.0.191 > 8.8.8.8: ICMP echo request, id 27485, seq 2, length 64
17:53:05.350936 e8:f7:24:49:49:ee > 40:f2:e9:c6:03:3d, ethertype IPv4 (0x0800), length 98: 8.8.8.8 > 192.168.0.191: ICMP echo reply, id 27485, seq 2, length 64
17:53:06.348159 40:f2:e9:c6:03:3d > e8:f7:24:49:49:ee, ethertype IPv4 (0x0800), length 98: 192.168.0.191 > 8.8.8.8: ICMP echo request, id 27485, seq 3, length 64
17:53:06.352855 e8:f7:24:49:49:ee > 40:f2:e9:c6:03:3d, ethertype IPv4 (0x0800), length 98: 8.8.8.8 > 192.168.0.191: ICMP echo reply, id 27485, seq 3, length 64
iptables and ebtables show no rules - everything set to ACCEPT. I have switched off all offload functions on the ports. No bonding is being used. The MAC addresses are unique - no overlaps that I can perceive.
Note that I see this for both CentOS6 and 7 host installs.
What am I overlooking?