Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 3 Apr 2014 02:23:47 -0700
From:      Adrian Chadd <adrian@freebsd.org>
To:        David Chisnall <theraven@theravensnest.org>
Cc:        "freebsd-wireless@freebsd.org" <freebsd-wireless@freebsd.org>
Subject:   Re: WDS with a FreeBSD access point
Message-ID:  <CAJ-Vmo=EWqn%2BXYQry3PRfx6jvoTvxfetR71BJQXiJEoxQ8DLRQ@mail.gmail.com>
In-Reply-To: <B76A5FF7-EB35-4A8E-96C9-8F6903C420B0@theravensnest.org>
References:  <E8950480-2829-4F4E-A48C-B080AE75BC97@FreeBSD.org> <533BD60D.9050701@weboutsourcing.cz> <CAJ-Vmokx1Ce7yQ=VGeqT4FnSgtG3JZMJs2bvs4vdbaYYDyZ0kw@mail.gmail.com> <533CD386.80906@weboutsourcing.cz> <E7DD4EF0-1A2F-4237-8995-F1D0AC1ABA87@theravensnest.org> <CAJ-Vmo=P50h6q1b0%2BTgFD%2Bh%2BhPfG7UiNd0vpPmO%2B5k374YOPSA@mail.gmail.com> <DDD043B9-1002-4E80-B687-11B8718A875C@theravensnest.org> <533D0C02.9010303@weboutsourcing.cz> <B76A5FF7-EB35-4A8E-96C9-8F6903C420B0@theravensnest.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi,

Ok. It's erm, slightly more and less complicated than that. here goes.

(Background reading: http://www.studioreti.it/slide/802-11-Frame_E_C.pdf)

Normal traffic between an AP and STA is classified as "three-address"
traffic - it has source MAC, destination MAC (ie, the station) and
BSSID (ie, the AP.)

This is why you can't have multiple MAC addresses on a single station
- because there's no separate destination station and destination MAC.
They're the same thing. Same as the source (from a STA) - there's no
separate addresses.

So, in a normal scenario you'll have an AP with a single VAP (virtual
access point) interface, in hostap mode.

When doing WDS, the traffic going to a repeater AP is not just going
to have the destination station, it also needs to know which AP to
relay it to. It's called a "four address" frame. So when a master AP
-> repeater AP transmission goes on, it sets:

* addr1 - destination AP
* addr2 - local address
* addr3 - destination ethernet address
* addr4 - source ethernet address

WDS doesn't care if the destination MAC address is a wireless station
or a wired station, it's still the same "destination ethernet address"
idea.

net80211 has special case code that says if the given VAP is
configured as a WDS peer or forced to use the 4addr format, it does
the above.

Now, why are there two (or more) VAPs? Put simply, it's an abstraction
thing. net80211 treats the WDS session between a master AP and any
slave APs as an associated WDS "station", and it gets a VAP created
just for that particular connection. It doesn't _need_ to, but having
it create dynamic VAPs (and thus netif entries) has its advantages -
it can reuse all of the same machinery as normal associations for
doing authentication and association handling; it can be force removed
by just ifconfig wlanX destroy; you can get per slave statistics via
the normal netstat interface.

Ok, so to sam's scripts.

They're all assuming "open" (ie, no encryption.) I know this isn't
ideal, but please give "open" a go to begin with to establish if it's
working or not. I don't know whether one wants to run hostapd on each
of the cloned VAPs or not. It _should_ work. But as I said, I've never
tried WDS and I have no idea whether wpa_supplicant and hostapd work
on creating the association links between devices.

Good luck!



-a


On 3 April 2014 00:23, David Chisnall <theraven@theravensnest.org> wrote:
> On 3 Apr 2014, at 08:21, Ondra Knezour <knezour@weboutsourcing.cz> wrote:
>
>> Dne 3.4.2014 9:05, David Chisnall napsal(a):
>>> 'STA and AP VAPs'?  Can we go back to assuming that I don't know anything please?
>>
>> STA - station, basically a client connecting to the access point
>> AP - access point
>> VAP - virtual AP, on one hardware device can be multiple virtual
>> APs/networks running
>
> My confusion is from the fact that I'm not sure why I have a VAP - I was assuming my configuration would have a single wlan device that would talk to stations and WDS remotes.  Is this not the case?
>
> David
>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAJ-Vmo=EWqn%2BXYQry3PRfx6jvoTvxfetR71BJQXiJEoxQ8DLRQ>