From owner-freebsd-current@FreeBSD.ORG Sat Aug 13 11:09:53 2005 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E7FE316A41F for ; Sat, 13 Aug 2005 11:09:53 +0000 (GMT) (envelope-from mime@traveller.cz) Received: from ss.eunet.cz (ss.eunet.cz [193.85.228.13]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4894643D48 for ; Sat, 13 Aug 2005 11:09:53 +0000 (GMT) (envelope-from mime@traveller.cz) Received: from localhost.i.cz (ss.eunet.cz [193.85.228.13]) by ss.eunet.cz (8.13.1/8.13.1) with ESMTP id j7DB9pTw059209 for ; Sat, 13 Aug 2005 13:09:51 +0200 (CEST) (envelope-from mime@traveller.cz) From: Michal Mertl To: freebsd-current@freebsd.org Content-Type: text/plain Date: Sat, 13 Aug 2005 13:09:46 +0200 Message-Id: <1123931386.61712.50.camel@genius1.i.cz> Mime-Version: 1.0 X-Mailer: Evolution 2.2.3 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit Subject: Possible wrong MAC address with bridge(4) X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Aug 2005 11:09:54 -0000 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 mtu 1500 options=b 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 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 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