From owner-freebsd-current@freebsd.org Mon Jan 11 22:53:10 2016 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DEF0FA6BE42; Mon, 11 Jan 2016 22:53:10 +0000 (UTC) (envelope-from cochard@gmail.com) Received: from mail-lb0-x22c.google.com (mail-lb0-x22c.google.com [IPv6:2a00:1450:4010:c04::22c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4D1C81749; Mon, 11 Jan 2016 22:53:10 +0000 (UTC) (envelope-from cochard@gmail.com) Received: by mail-lb0-x22c.google.com with SMTP id x4so5757250lbm.0; Mon, 11 Jan 2016 14:53:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:content-type; bh=8NNcFGvRUIAq3R0zzBqZGD+X6dVaygaZxOOfzZjWvP4=; b=GJACdDnwnw3s2mHBFe8GcJZ2q/zzwcu0X7kONPZAMpPtEpS406ZNwbcohLpmvryfhH 86CtGEVierEY17NuRAXLXmIP5lsHZDOaB1kzvyusd+TccaICb6mLIrkevwBqjPSQUW5/ VXQjc3nuPlZn5Sm4JtImBCYYdo8gBsXy0+eDHVmfXcRRhFSpcEfOk4o7/4otEdvTdPjc hN0TUWuO8Und1X4xyM7xUNkcOWNQS3Mt+TSlgsF1URn6WIz4ECrfD/9l3yczO0VFzAP7 hIh0tmLYKnjPDBcGAkGHF2oADMYH6AagHneKWl7u26ruAr/LsMPgmql/CPQOravPkgSv Hggw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cochard-me.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:content-type; bh=8NNcFGvRUIAq3R0zzBqZGD+X6dVaygaZxOOfzZjWvP4=; b=QgOjfpE0Ce+8wBSVXt/+lri1DvBLeKFzamPig1jCjvHlw/H66KcTKhELk4c/tB4yQC q7WoBPP1WPlTLneQz41j5Fd9d6SbOVcDdlYQGygH0esaiRQziFZrWtplVADjXd0DPnVS MLgz46AAIZaTauFC4Z2QTV96HsqoUNMIRpACKJpGMcvB4UHvYeJJ+BLVJwSv+vv1LAEq qk2C56pvYu4UvEFixsm5ML5h//5M1/jS4xU62iFYpeWkLost38J/nH/+rff4G1sIRkL3 4LEdgt6vtVerbhg+x1ucKZqO9LXUNsfNv682e4vK63/u4yO/d+wCuGCbQ7R3ZkCezgqg atRw== X-Received: by 10.112.149.202 with SMTP id uc10mr3531738lbb.57.1452552787888; Mon, 11 Jan 2016 14:53:07 -0800 (PST) MIME-Version: 1.0 Sender: cochard@gmail.com Received: by 10.25.200.10 with HTTP; Mon, 11 Jan 2016 14:52:47 -0800 (PST) In-Reply-To: References: From: =?UTF-8?Q?Olivier_Cochard=2DLabb=C3=A9?= Date: Mon, 11 Jan 2016 23:52:47 +0100 X-Google-Sender-Auth: PYVoYtNDXFwb28Lna_YzgIcmtjQ Message-ID: Subject: Re: forwarding didn't work if wlan0 is member of a bridge To: "freebsd-current@freebsd.org" , "freebsd-wireless@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.20 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: Mon, 11 Jan 2016 22:53:11 -0000 After weeks of troubleshooting, at last I found how to reproduce this problem ;-) Here is the setup: LAN0 <--> [(re0) fbsd router (bridge0 addm re1 addm wlan0)] <--> Wireless LAN If interface re1 (bridge0 member with wlan0) is in "active" status (=ethernet cable plugged to something): I don't have any problem, all is working great for my wireless clients connected to wlan0: They can ping devices in LAN0. But once I've unplug the ethernet cable connected to re1 (bridge member with wlan0) and re1 state switch to "no carrier", Wireless LAN clients are not able to reach LAN0. Here is my rc.conf with simple subnetting for Adrian ;-) wlans_ath0="wlan0" ifconfig_wlan0="hostap channel 6" create_args_wlan0="wlanmode hostap" cloned_interfaces="bridge0" ifconfig_re0="inet 1.0.0.1/24" ifconfig_re1="up" ifconfig_bridge0="inet 1.1.1.1/24 addm re1 addm wlan0 up" gateway_enable="YES" And an example with re1 in "no carrier" status: root@fbsd-router:~ # ifconfig bridge0 bridge0: flags=8843 metric 0 mtu 1500 ether 02:6b:c0:de:b8:00 inet 1.1.1.1 netmask 0xffffff00 broadcast 1.1.1.255 nd6 options=9 groups: bridge id 00:00:00:00:00:00 priority 32768 hellotime 2 fwddelay 15 maxage 20 holdcnt 6 proto rstp maxaddr 2000 timeout 1200 root id 00:00:00:00:00:00 priority 32768 ifcost 0 port 0 member: wlan0 flags=143 ifmaxaddr 0 port 5 priority 128 path cost 33333 member: re1 flags=143 ifmaxaddr 0 port 2 priority 128 path cost 55 root@fbsd-router:~ # ifconfig re1 re1: flags=8943 metric 0 mtu 1500 options=82099 ether 00:0d:b9:3c:ae:25 nd6 options=29 media: Ethernet autoselect (none) status: no carrier => from a wireless LAN client (1.1.1.2) I'm trying to ping a host on LAN0 (1.0.0.2): root@fbsd-router:~ # tcpdump -pni re0 tcpdump: verbose output suppressed, use -v or -vv for full protocol decode listening on re0, link-type EN10MB (Ethernet), capture size 262144 bytes 23:38:04.466866 ARP, Request who-has 1.0.0.2 tell 1.0.0.1, length 28 23:38:04.467052 ARP, Reply 1.0.0.2 is-at 00:08:a2:09:c4:a2, length 46 23:38:04.467090 IP 1.1.1.2 > 1.0.0.2: ICMP echo request, id 72, seq 1, length 64 23:38:04.467226 IP 1.0.0.2 > 1.1.1.2: ICMP echo reply, id 72, seq 1, length 64 23:38:04.467300 IP 1.0.0.1 > 1.0.0.2: ICMP host 1.1.1.2 unreachable, length 36 23:38:05.483053 IP 1.1.1.2 > 1.0.0.2: ICMP echo request, id 72, seq 2, length 64 23:38:05.483259 IP 1.0.0.2 > 1.1.1.2: ICMP echo reply, id 72, seq 2, length 64 23:38:05.483318 IP 1.0.0.1 > 1.0.0.2: ICMP host 1.1.1.2 unreachable, length 36 23:38:06.387304 IP 1.1.1.2 > 1.0.0.2: ICMP echo request, id 72, seq 3, length 64 23:38:06.387466 IP 1.0.0.2 > 1.1.1.2: ICMP echo reply, id 72, seq 3, length 64 23:38:06.387514 IP 1.0.0.1 > 1.0.0.2: ICMP host 1.1.1.2 unreachable, length 36 ^C 11 packets captured 11 packets received by filter 0 packets dropped by kernel root@fbsd-router:~ # arp -na ? (1.1.1.1) at 02:6b:c0:de:b8:00 on bridge0 permanent [bridge] ? (1.1.1.2) at fc:64:ba:97:c0:ff on bridge0 expires in 1168 seconds [bridge] ? (1.0.0.1) at 00:0d:b9:3c:ae:24 on re0 permanent [ethernet] => The FreeBSD router answers "unreacheable" to the host: My wireless LAN client never get the ICMP reply. => Now I plug eth1 to a dummy machine (just for changing its status): root@fbsd-router:~ # ifconfig re1 re1: flags=8943 metric 0 mtu 1500 options=82099 ether 00:0d:b9:3c:ae:25 nd6 options=29 media: Ethernet autoselect (1000baseT ) status: active => and I restart the same ping from the wireless LAN client: root@fbsd-router:~ # tcpdump -pni re0 tcpdump: verbose output suppressed, use -v or -vv for full protocol decode listening on re0, link-type EN10MB (Ethernet), capture size 262144 bytes 23:44:08.597429 IP 1.1.1.2 > 1.0.0.2: ICMP echo request, id 74, seq 1, length 64 23:44:08.597660 IP 1.0.0.2 > 1.1.1.2: ICMP echo reply, id 74, seq 1, length 64 23:44:09.604447 IP 1.1.1.2 > 1.0.0.2: ICMP echo request, id 74, seq 2, length 64 23:44:09.604683 IP 1.0.0.2 > 1.1.1.2: ICMP echo reply, id 74, seq 2, length 64 23:44:10.609711 IP 1.1.1.2 > 1.0.0.2: ICMP echo request, id 74, seq 3, length 64 23:44:10.609874 IP 1.0.0.2 > 1.1.1.2: ICMP echo reply, id 74, seq 3, length 64 => It's works :-) How the status of a member of the bridge can impact the routing behavior of other interfaces ? How to fix this problem ? Thanks