Date: Tue, 18 Apr 2006 16:54:21 +0200 From: Erik Trulsson <ertr1013@student.uu.se> To: Fabian Keil <freebsd-listen@fabiankeil.de> Cc: freebsd-net@freebsd.org, Sten Daniel =?iso-8859-1?Q?S=F8rsdal?= <lists@wm-access.no>, Andrew Thompson <thompsa@freebsd.org> Subject: Re: How to use if_bridge Message-ID: <20060418145421.GA61197@owl.midgard.homeip.net> In-Reply-To: <20060418164142.0831e7db@localhost> References: <200604142048.20189.doconnor@gsoft.com.au> <20060414140709.20c51ebc@localhost> <200604151053.25089.doconnor@gsoft.com.au> <20060415115352.1ef82bb1@localhost> <20060415195147.GA54638@heff.fud.org.nz> <20060415232801.0dbbc8f4@localhost> <4444CA13.8000405@wm-access.no> <20060418164142.0831e7db@localhost>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Apr 18, 2006 at 04:41:42PM +0200, Fabian Keil wrote: > Sten Daniel S=F8rsdal <lists@wm-access.no> wrote: >=20 > > Fabian Keil wrote: > >=20 > > > The example section has the following sentence "Such a con- > > > figuration could be used to implement a simple 802.11-to-Ethernet bri= dge > > > (assuming the 802.11 interface is in ad-hoc mode)." > > >=20 > > > I don't get the meaning of the ad-hoc mode part. In my tests if_bridge > > > worked in hostap mode as well, but failed in infrastructure mode. Cou= ld > > > you clarify if (or why not) bridging in infrastructure mode should wo= rk? > >=20 > > hostap should work, ad-hoc should work. by infrastructure you mean that > > the card operates as a 'station'? then it shouldn't work (correctly) as > > defined by the standard. commercial products tend to implement "mac-nat" > > or just simple dumb passthrough (which requires support on the ap side > > and is very much like ad-hoc mode). >=20 > By infrastructure mode I mean the card is connected to an access > point, in other words the default mode.=20 > =20 > > you would want to look into WDS for a standard way of dealing with > > bridging on 802.11 >=20 > Thanks for the tip, but I'm not sure if it would help in my case. > Wikipedia says WDS "enables the interconnection of access points", > which is not what I wanted. >=20 > I tried if_bridge to let QEMU on my laptop talk to the wireless > network. It worked if the Laptop's NIC was in ad-hoc or hostap mode, > but failed if the NIC was connected to an access point. >=20 > NAT solved the problem, but I still don't understand why if_bridge > didn't work. If it was expected to fail I think it should be mentioned > in the man page. Because when a station sends a packet to an AP the source ethernet address must be that of the station. =20 A bridge should not modify the packets passed through it so then the source address should be that of the originating computer instead of that of the station and then things will not work correctly. This can be solved with "4-address" frames that add a 'station' field to the transmitted frames. This requires that both station and AP support 4-address frames, which few do. The wireless code in FreeBSD does not have such support yet. (4-address frames is a necessary component for WDS, but WDS needs a bit more than that. 4-address frames can be used with a normal AP-station connection if both sides support it, but as I said few devices support it currently.) (The four addresses involved are: source, dest, station, AP; as compared to the three addresses used in normal 802.11 frames: source, dest, AP.) --=20 <Insert your favourite quote here.> Erik Trulsson ertr1013@student.uu.se
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060418145421.GA61197>