[Ns-developers] bridging and wifi

Gustavo Carneiro gjcarneiro at gmail.com
Mon Aug 25 14:05:12 PDT 2008


2008/8/25 Mathieu Lacage <mathieu.lacage at sophia.inria.fr>

>
> On Mon, 2008-08-25 at 21:48 +0100, Gustavo Carneiro wrote:
>
>
> >         For simplicity, let's say that wifi network is adhoc.
> >
> > This is an assumption with serious implications.  I don't think this
> > would ever work, conceptually, with wifi in adhoc mode because adhoc
> > mode frames only use two addresses.  It has to be in infrastructure
> > mode, because then frames have 3 addresses.
>
> ok
>
>
> >         At this point, I got a bit stomped and went back to some
> >         serious wifi
> >         spec reading and thinking but I still don't really know how
> >         that is
> >         expected to work. Gustavo, do you have any idea ?
> >
> > I think I have an idea.
> >
> > As I mentioned before, wifi has to be in infrastructure mode, adhoc
> > won't work (incidentally trying to do bridging in Linux with cards in
> > adhoc mode is a mistake I often used to make in the past).
> >
> > The 802.11 frame has a total of four addresses, which have the
> > following meaning in infrastructure mode (this table comes from
> > somewhere deep in the 802.11 standard):
> >
> >
> >   /*
> >    *  To DS    From DS   Address 1    Address 2    Address 3
> > Address 4
> >
> > *----------------------------------------------------------------------
> >    *    0        0       Destination  Source        BSSID         N/A
> >    *    0        1       Destination  BSSID         Source        N/A
> >    *    1        0       BSSID        Source        Destination   N/A
> >    *    1        1       Receiver     Transmitter   Destination
> > Source
> >    */
> >
> > The ARP response, as transmitted by node 3, is of the type ToDS=1,
> > FromDS=0, therefore Address 1 is the BSSID (AP netdevice MAC), Address
> > 2 is mac3, Address 3 is mac1, and Address 4 is not used.  The Access
> > Point (node2) will receive a frame whose BSSID is itself and so will
> > send a Wifi ACK back to the source (Address 2 == mac3).
>
> I more or less reached the same kind of conclusion here but, what
> bothers me is that if I make node 3 be the AP and node 2 be a STA, it
> won't work, right ?


Right, a wifi netdevice in STA mode cannot be part of bridging.  But it's
like this in real world... I never heard of a Wifi station doing bridging
before...

Luckily we don't have to try to make something better than real world. ;-)

-- 
Gustavo J. A. M. Carneiro
INESC Porto, Telecommunications and Multimedia Unit
"The universe is always one step beyond logic." -- Frank Herbert


More information about the Ns-developers mailing list