Hello,
Thanks guys for the pointer on pair. My mail was intended to show (what IMO is) an issue in the bridge code. With the recent post on n2k15 by Reyk[0], I'll keep an eye on the following developments :) Claer [O] http://undeadly.org/cgi?action=article&sid=20151217134417 On Thu, Dec 17 2015 at 19:12, Claer wrote: > Hello, > > I'm trying a "strange" setup with rdomains, bridge and vether. As there is > something I don't understand, I'd like to know if the behavior is normal or if > it is an issue. This is not a production system, just experimentations. > > Here is what I'm trying to do. With 1 NIC connected to a "physical" network, I > wish to have several rdomains connected to the same uplink VLAN. > As this uplink VLAN provides DHCP, it facilitates the configuration. > > When everything is up, I can ping the default router from either rdomain but I > can't ping rdomain 1 from rdomain 2 or vice versa. Arp is failing to resolve > the IP addresses eventhough the arp packet is received on vether interface. > With 2 NICs, the communication succeeds. > > The results are the same with 5.8 and current (snapshot downloaded yesterday) > > Here is the setup : > > 1/ configure the interfaces > testhost:~ # cat /etc/hostname.em0 > dhcp > > testhost:~ # cat /etc/hostname.em1 > rdomain 1 > !route -T 1 exec dhclient em1 > testhost:~ # > > testhost:~ # cat /etc/hostname.vether2 > rdomain 2 > !route -T 2 exec dhclient vether2 > up > testhost:~ # > > 2/ Build the bridge : > testhost:~ # cat /etc/hostname.bridge0 > add em1 > add vether2 > up > testhost:~ # > > 3/ Verify configuration : > testhost:~ # ifconfig bridge0 > bridge0: flags=41<UP,RUNNING> > groups: bridge > priority 32768 hellotime 2 fwddelay 15 maxage 20 holdcnt 6 proto rstp > designated: id 00:00:00:00:00:00 priority 0 > em1 flags=3<LEARNING,DISCOVER> > port 2 ifpriority 0 ifcost 0 > vether2 flags=3<LEARNING,DISCOVER> > port 5 ifpriority 0 ifcost 0 > Addresses (max cache: 100, timeout: 240): > 08:00:27:2c:87:f2 em1 1 flags=0<> > 00:50:b6:67:9c:82 em1 1 flags=0<> > [...] > testhost:~ # ifconfig em0 > em0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500 > lladdr 08:00:27:2c:87:f2 > priority: 0 > groups: egress > media: Ethernet autoselect (1000baseT full-duplex) > status: active > inet 192.168.79.39 netmask 0xffffff00 broadcast 192.168.79.255 > testhost:~ # ifconfig em1 > em1: flags=8b43<UP,BROADCAST,RUNNING,PROMISC,ALLMULTI,SIMPLEX,MULTICAST> > rdomain 1 mtu 1500 > lladdr 08:00:27:36:20:e8 > priority: 0 > media: Ethernet autoselect (1000baseT full-duplex) > status: active > inet 192.168.79.159 netmask 0xffffff00 broadcast 192.168.79.255 > testhost:~ # ifconfig vether2 > vether2: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> rdomain 2 > mtu 1500 > lladdr fe:e1:ba:d0:45:3b > priority: 0 > groups: vether > media: Ethernet autoselect > status: active > inet 192.168.79.193 netmask 0xffffff00 broadcast 192.168.79.255 > testhost:~ # route -n show -inet > Routing tables > > Internet: > Destination Gateway Flags Refs Use Mtu Prio Iface > default 192.168.79.254 UGS 0 788 - 8 em0 > 127/8 127.0.0.1 UGRS 0 0 32768 8 lo0 > 127.0.0.1 127.0.0.1 UHl 0 0 32768 1 lo0 > 192.168.79/24 192.168.79.39 UC 4 12990 - 4 em0 > 192.168.79.39 08:00:27:2c:87:f2 UHLl 0 22 - 1 em0 > 192.168.79.123 70:5a:b6:af:a0:42 UHLc 1 6503 - 4 em0 > 192.168.79.159 08:00:27:36:20:e8 UHLc 0 11027 - 4 em0 > 192.168.79.193 fe:e1:ba:d0:45:3b UHLc 0 11795 - 4 em0 > 192.168.79.254 2c:76:8a:30:2b:00 UHLc 1 1192 - 4 em0 > 192.168.79.255 192.168.79.39 UHb 0 5764 - 1 em0 > 224/4 127.0.0.1 URS 0 195 32768 8 lo0 > > testhost:~ # route -nT1 show > Routing tables > > Internet: > Destination Gateway Flags Refs Use Mtu Prio Iface > default 192.168.79.254 UGS 0 1752 - 8 em1 > 192.168.79/24 192.168.79.159 UC 1 15026 - 4 em1 > 192.168.79.159 08:00:27:36:20:e8 UHLl 0 0 - 1 em1 > 192.168.79.254 2c:76:8a:30:2b:00 UHLc 1 1167 - 4 em1 > 192.168.79.255 192.168.79.159 UHb 0 734 - 1 em1 > > testhost:~ # route -nT2 show > Routing tables > > Internet: > Destination Gateway Flags Refs Use Mtu Prio Iface > default 192.168.79.254 UGS 0 2215 - 8 > vether2 > 192.168.79/24 192.168.79.193 UC 1 5334 - 4 > vether2 > 192.168.79.193 fe:e1:ba:d0:45:3b UHLl 0 0 - 1 > vether2 > 192.168.79.254 2c:76:8a:30:2b:00 UHLc 1 399 - 4 > vether2 > 192.168.79.255 192.168.79.193 UHb 0 2317 - 1 > vether2 > > 4/ Ping tests > testhost:~ # ping -c 2 192.168.79.159 > PING 192.168.79.159 (192.168.79.159): 56 data bytes > 64 bytes from 192.168.79.159: icmp_seq=0 ttl=255 time=1.297 ms > 64 bytes from 192.168.79.159: icmp_seq=1 ttl=255 time=0.639 ms > --- 192.168.79.159 ping statistics --- > 2 packets transmitted, 2 packets received, 0.0% packet loss > round-trip min/avg/max/std-dev = 0.639/0.968/1.297/0.329 ms > > testhost:~ # ping -c 2 192.168.79.193 > PING 192.168.79.193 (192.168.79.193): 56 data bytes > 64 bytes from 192.168.79.193: icmp_seq=0 ttl=255 time=0.820 ms > 64 bytes from 192.168.79.193: icmp_seq=1 ttl=255 time=0.617 ms > --- 192.168.79.193 ping statistics --- > 2 packets transmitted, 2 packets received, 0.0% packet loss > round-trip min/avg/max/std-dev = 0.617/0.718/0.820/0.102 ms > > testhost:~ # ping -c2 -V1 192.168.79.39 > PING 192.168.79.39 (192.168.79.39): 56 data bytes > 64 bytes from 192.168.79.39: icmp_seq=0 ttl=255 time=0.587 ms > 64 bytes from 192.168.79.39: icmp_seq=1 ttl=255 time=0.633 ms > --- 192.168.79.39 ping statistics --- > 2 packets transmitted, 2 packets received, 0.0% packet loss > round-trip min/avg/max/std-dev = 0.587/0.610/0.633/0.023 ms > > testhost:~ # ping -c2 -V1 192.168.79.193 > PING 192.168.79.193 (192.168.79.193): 56 data bytes > --- 192.168.79.193 ping statistics --- > 2 packets transmitted, 0 packets received, 100.0% packet loss > > 5/ Arp tables > testhost:~ # arp -na > Host Ethernet Address Netif Expire Flags > 192.168.79.39 08:00:27:2c:87:f2 em0 permanent l > 192.168.79.123 70:5a:b6:af:a0:42 em0 19m54s > 192.168.79.159 08:00:27:36:20:e8 em0 14m47s > 192.168.79.193 fe:e1:ba:d0:45:3b em0 16m18s > 192.168.79.254 2c:76:8a:30:2b:00 em0 20m0s > testhost:~ # arp -nV1 -a > Host Ethernet Address Netif Expire Flags > 192.168.79.39 08:00:27:2c:87:f2 em1 15m33s > 192.168.79.159 08:00:27:36:20:e8 em1 permanent l > 192.168.79.193 (incomplete) em1 expired > 192.168.79.254 2c:76:8a:30:2b:00 em1 19m59s > testhost:~ # arp -nV2 -a > Host Ethernet Address Netif Expire Flags > 192.168.79.39 08:00:27:2c:87:f2 vether2 14m6s > 192.168.79.193 fe:e1:ba:d0:45:3b vether2 permanent l > 192.168.79.254 2c:76:8a:30:2b:00 vether2 20m0s > > 6/ tcpdump on the vether side > On one terminal : # ping -V1 192.168.79.193 > On another terminal : > testhost:~ # tcpdump -neli vether2 arp | grep 192.168.79.193 > tcpdump: listening on vether2, link-type EN10MB > 12:14:18.050311 08:00:27:36:20:e8 ff:ff:ff:ff:ff:ff 0806 42: arp who-has > 192.168.79.193 tell 192.168.79.159 > 12:14:19.054795 08:00:27:36:20:e8 ff:ff:ff:ff:ff:ff 0806 42: arp who-has > 192.168.79.193 tell 192.168.79.159 > 12:14:20.054016 08:00:27:36:20:e8 ff:ff:ff:ff:ff:ff 0806 42: arp who-has > 192.168.79.193 tell 192.168.79.159 > > Thanks for reading that far :) > > > Claer