From owner-freebsd-wireless@freebsd.org Tue Jan 12 18:22:49 2016 Return-Path: Delivered-To: freebsd-wireless@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 7957CA8035C; Tue, 12 Jan 2016 18:22:49 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-ig0-x22a.google.com (mail-ig0-x22a.google.com [IPv6:2607:f8b0:4001:c05::22a]) (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 55681109A; Tue, 12 Jan 2016 18:22:49 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by mail-ig0-x22a.google.com with SMTP id mw1so135464941igb.1; Tue, 12 Jan 2016 10:22:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=uFf25AHchebOfjrJQ1UbJCcqHjJW+/LWDPczSGlcBpg=; b=Anoxk0eIvAlW/lGRTX8+5kJ8eCMVf/emBJPLIIUG1Lt6eVqsY9snDjpvin6i2NHaAP 2bmKBOc03S2gQcgPQCn1yqGRJ1PtUhbVPS/moJidkXgfFFJGF3zJqLD8cOZ84p5RDPTA 7aVRcZGIxX3AR5oKn/M4qxRomYCEecINK+yEfYNWN7E1vP9J35B9C3gH6O/1f6J1O4u8 VJcLIyYfpejfEvC4hAxBgj6fPD5ecZSezCAxyNCpOaza0ONsE6WtOS6FLQbLzIontplm 4xh4RJd3pbB/KgsRpF5h9i5ad5gXHAy81qTh1Pl7OfDyFsQrdZycb3oK58J40Zn+98H/ r1xg== MIME-Version: 1.0 X-Received: by 10.50.137.41 with SMTP id qf9mr17904253igb.22.1452622968406; Tue, 12 Jan 2016 10:22:48 -0800 (PST) Received: by 10.36.121.202 with HTTP; Tue, 12 Jan 2016 10:22:48 -0800 (PST) In-Reply-To: References: Date: Tue, 12 Jan 2016 10:22:48 -0800 Message-ID: Subject: Re: forwarding didn't work if wlan0 is member of a bridge From: Adrian Chadd To: =?UTF-8?Q?Olivier_Cochard=2DLabb=C3=A9?= Cc: "freebsd-current@freebsd.org" , "freebsd-wireless@freebsd.org" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: freebsd-wireless@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "Discussions of 802.11 stack, tools device driver development." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Jan 2016 18:22:49 -0000 This is actually the intended behaviour, right? The routed interface is down, so the IP address on it and connected to it are unreachable. -a On 11 January 2016 at 14:52, Olivier Cochard-Labb=C3=A9 wrote: > 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 > (=3Dethernet cable plugged to something): I don't have any problem, all i= s > 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 ar= e > not able to reach LAN0. > > Here is my rc.conf with simple subnetting for Adrian ;-) > > wlans_ath0=3D"wlan0" > ifconfig_wlan0=3D"hostap channel 6" > create_args_wlan0=3D"wlanmode hostap" > cloned_interfaces=3D"bridge0" > ifconfig_re0=3D"inet 1.0.0.1/24" > ifconfig_re1=3D"up" > ifconfig_bridge0=3D"inet 1.1.1.1/24 addm re1 addm wlan0 up" > gateway_enable=3D"YES" > > And an example with re1 in "no carrier" status: > > root@fbsd-router:~ # ifconfig bridge0 > bridge0: flags=3D8843 metric 0 mt= u > 1500 > ether 02:6b:c0:de:b8:00 > inet 1.1.1.1 netmask 0xffffff00 broadcast 1.1.1.255 > nd6 options=3D9 > 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=3D143 > ifmaxaddr 0 port 5 priority 128 path cost 33333 > member: re1 flags=3D143 > ifmaxaddr 0 port 2 priority 128 path cost 55 > > > root@fbsd-router:~ # ifconfig re1 > re1: flags=3D8943 metric = 0 > mtu 1500 > > options=3D82099 > ether 00:0d:b9:3c:ae:25 > nd6 options=3D29 > media: Ethernet autoselect (none) > status: no carrier > > =3D> from a wireless LAN client (1.1.1.2) I'm trying to ping a host on LA= N0 > (1.0.0.2): > > root@fbsd-router:~ # tcpdump -pni re0 > tcpdump: verbose output suppressed, use -v or -vv for full protocol decod= e > 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, leng= th > 64 > 23:38:04.467300 IP 1.0.0.1 > 1.0.0.2: ICMP host 1.1.1.2 unreachable, leng= th > 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, leng= th > 64 > 23:38:05.483318 IP 1.0.0.1 > 1.0.0.2: ICMP host 1.1.1.2 unreachable, leng= th > 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, leng= th > 64 > 23:38:06.387514 IP 1.0.0.1 > 1.0.0.2: ICMP host 1.1.1.2 unreachable, leng= th > 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 [brid= ge] > ? (1.0.0.1) at 00:0d:b9:3c:ae:24 on re0 permanent [ethernet] > > =3D> The FreeBSD router answers "unreacheable" to the host: My wireless L= AN > client never get the ICMP reply. > > =3D> Now I plug eth1 to a dummy machine (just for changing its status): > > root@fbsd-router:~ # ifconfig re1 > re1: flags=3D8943 metric = 0 > mtu 1500 > > options=3D82099 > ether 00:0d:b9:3c:ae:25 > nd6 options=3D29 > media: Ethernet autoselect (1000baseT ) > status: active > > =3D> 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 decod= e > 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, leng= th > 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, leng= th > 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, leng= th > 64 > > =3D> 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 > _______________________________________________ > freebsd-current@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org= "