Possible wrong MAC address with bridge(4)

Michal Mertl mime at traveller.cz
Sat Aug 13 11:09:54 GMT 2005


I played a little with bridge(4) and found out that when I want to
communicate with the IP address on one of the member interfaces of a
bridge the system behaves a little strange.

This is the configuration of the bridge machine:
> ifconfig
fxp0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu
1500
        options=b<RXCSUM,TXCSUM,VLAN_MTU>
        inet 10.0.0.1 netmask 0xffffff00 broadcast 10.0.0.255
        ether 00:0e:0c:68:71:6a
        media: Ethernet autoselect (100baseTX)
        status: active
ath0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu
1500
        inet 192.168.0.1 netmask 0xffffff00 broadcast 192.168.0.255
        ether 00:0b:6b:35:dc:d4
        media: IEEE 802.11 Wireless Ethernet autoselect mode 11b
<hostap>
        status: associated
        ssid mig_ap_xx channel 1 bssid 00:0b:6b:35:dc:d4
        authmode OPEN privacy OFF txpowmax 16 protmode CTS dtimperiod 1
        bintval 100

net.link.ether.bridge.enable: 1
net.link.ether.bridge.config: fxp0,ath0

When I ping from behind the fxp0 interface the ip address of the ath0
interface, the ARP returns the MAC address of the ath0 interface but the
packets have source MAC address of the fxp0 interface (see tcpdump
snippet at the end of this message). Is it correct?

The system doesn't check if the source MAC address of incoming packets
matches expected (as learned by ARP) so the communication works.

genius1# tcpdump -vvlnepi em0
tcpdump: listening on em0, link-type EN10MB (Ethernet), capture size 68
bytes
12:55:02.173340 00:0d:60:cd:ae:e2 > ff:ff:ff:ff:ff:ff, ethertype ARP
(0x0806), length 42: arp who-has 192.168.0.1 tell 192.168.0.2
12:55:02.173588 00:0e:0c:68:71:6a > 00:0d:60:cd:ae:e2, ethertype ARP
(0x0806), length 60: arp reply 192.168.0.1 is-at 00:0e:0c:68:71:6a
12:55:02.173765 00:0d:60:cd:ae:e2 > 00:0e:0c:68:71:6a, ethertype IPv4
(0x0800), length 98: (tos 0x0, ttl  64, id 58301, offset 0, flags
[none], proto: ICMP (1), length: 84) 192.168.0.2 > 192.168.0.1: ICMP
echo request, id 563, seq 0, length 64
12:55:02.173920 00:0b:6b:35:dc:d4 > 00:0d:60:cd:ae:e2, ethertype IPv4
(0x0800), length 98: (tos 0x0, ttl  64, id 310, offset 0, flags [none],
proto: ICMP (1), length: 84) 192.168.0.1 > 192.168.0.2: ICMP echo reply,
id 563, seq 0, length 64

Michal



More information about the freebsd-current mailing list