From owner-freebsd-wireless@FreeBSD.ORG Thu Apr 3 09:23:48 2014 Return-Path: Delivered-To: freebsd-wireless@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 61FA8B4C for ; Thu, 3 Apr 2014 09:23:48 +0000 (UTC) Received: from mail-qc0-x235.google.com (mail-qc0-x235.google.com [IPv6:2607:f8b0:400d:c01::235]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1D4F4FE6 for ; Thu, 3 Apr 2014 09:23:48 +0000 (UTC) Received: by mail-qc0-f181.google.com with SMTP id x3so1513910qcv.26 for ; Thu, 03 Apr 2014 02:23:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=AT7b9kegN80qF5E/941cgjk39Hwz14cs9ml35TDUM/c=; b=pZrchxCBoBpxw4uN/zOHLiaO8BsZ5Z+IH+j/oNtmznds+oyXnFukfjTac2VkwISuwA 9lP6VSs5Xw/ON3k0wV7Zc0OesyM7xks2jQLY5DU0imA5I7DArvDt3G+SKjb8q9/yWbMt 7CwiTXw9cGZK+c9OmocNA0HnyIxvbhhjP92weHHP88OwXkII65sGEPNW+DzmMGDVM8r1 jEzrAJJDWEu9swI3vOxIx6llI+RCfKvcj6b/b/zpLVpehX73XTcxekR+A37xqJTpG4tE JqXxpHC27LOM4oHniePMjAqC1UnpboS75BX/d00Sn7YoUWjjBJ67jpB2BFX1DPlBJxL4 Rd5A== MIME-Version: 1.0 X-Received: by 10.140.42.9 with SMTP id b9mr5654887qga.87.1396517027303; Thu, 03 Apr 2014 02:23:47 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.224.50.143 with HTTP; Thu, 3 Apr 2014 02:23:47 -0700 (PDT) In-Reply-To: References: <533BD60D.9050701@weboutsourcing.cz> <533CD386.80906@weboutsourcing.cz> <533D0C02.9010303@weboutsourcing.cz> Date: Thu, 3 Apr 2014 02:23:47 -0700 X-Google-Sender-Auth: 0N3unBc1Ildgw8ytIhd1zyhVvIc Message-ID: Subject: Re: WDS with a FreeBSD access point From: Adrian Chadd To: David Chisnall Content-Type: text/plain; charset=ISO-8859-1 Cc: "freebsd-wireless@freebsd.org" X-BeenThere: freebsd-wireless@freebsd.org X-Mailman-Version: 2.1.17 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: Thu, 03 Apr 2014 09:23:48 -0000 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 wrote: > On 3 Apr 2014, at 08:21, Ondra Knezour 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 >