Skip to contentSkip to conversation

ath9k: Virtual interface as AP

ath9k-devel Lorna González 3 participants 6 messages Oct 28, 2010 – Nov 12, 2010

lore
Share & tools
lore
#0 lore raw

Hello,

After trying to build two virtual interfaces, one as a STA and another one as AP on mac80211 with an AR928X, creating a new interface with:

iw phy phy0 interface add wlan1 type __ap

I got a new interface called wlan1_rename, the one I used to build the AP interface.

Running hostapd I finally got following:

Configuration file: hostapd.conf
Opening raw packet socket for ifindex -1215975436
BSS count 1, BSSID mask ff:ff:ff:ff:ff:ff (0 bits)
SIOCGIWRANGE: WE(compiled)=22 WE(source)=21 enc_capa=0xf
nl80211: Added 802.11b mode based on 802.11g information
Allowed channel: mode=1 chan=1 freq=2412 MHz max_tx_power=20 dBm Allowed channel: mode=1 chan=2 freq=2417 MHz max_tx_power=20 dBm Allowed channel: mode=1 chan=3 freq=2422 MHz max_tx_power=20 dBm Allowed channel: mode=1 chan=4 freq=2427 MHz max_tx_power=20 dBm Allowed channel: mode=1 chan=5 freq=2432 MHz max_tx_power=20 dBm Allowed channel: mode=1 chan=6 freq=2437 MHz max_tx_power=20 dBm Allowed channel: mode=1 chan=7 freq=2442 MHz max_tx_power=20 dBm Allowed channel: mode=1 chan=8 freq=2447 MHz max_tx_power=20 dBm Allowed channel: mode=1 chan=9 freq=2452 MHz max_tx_power=20 dBm Allowed channel: mode=1 chan=10 freq=2457 MHz max_tx_power=20 dBm Allowed channel: mode=1 chan=11 freq=2462 MHz max_tx_power=20 dBm Allowed channel: mode=0 chan=1 freq=2412 MHz max_tx_power=20 dBm Allowed channel: mode=0 chan=2 freq=2417 MHz max_tx_power=20 dBm Allowed channel: mode=0 chan=3 freq=2422 MHz max_tx_power=20 dBm Allowed channel: mode=0 chan=4 freq=2427 MHz max_tx_power=20 dBm Allowed channel: mode=0 chan=5 freq=2432 MHz max_tx_power=20 dBm Allowed channel: mode=0 chan=6 freq=2437 MHz max_tx_power=20 dBm Allowed channel: mode=0 chan=7 freq=2442 MHz max_tx_power=20 dBm Allowed channel: mode=0 chan=8 freq=2447 MHz max_tx_power=20 dBm Allowed channel: mode=0 chan=9 freq=2452 MHz max_tx_power=20 dBm Allowed channel: mode=0 chan=10 freq=2457 MHz max_tx_power=20 dBm Allowed channel: mode=0 chan=11 freq=2462 MHz max_tx_power=20 dBm RATE[0] rate=10 flags=0x2
RATE[1] rate=20 flags=0x6
RATE[2] rate=55 flags=0x6
RATE[3] rate=110 flags=0x6
RATE[4] rate=60 flags=0x0
RATE[5] rate=90 flags=0x0
RATE[6] rate=120 flags=0x0
RATE[7] rate=180 flags=0x0
RATE[8] rate=240 flags=0x0
RATE[9] rate=360 flags=0x0
RATE[10] rate=480 flags=0x0
RATE[11] rate=540 flags=0x0
Passive scanning not supported
Flushing old station entries
Deauthenticate all stations
Mode: IEEE 802.11g Channel: 5 Frequency: 2432 MHz
Using interface wlan1_rename with hwaddr 00:22:43:21:82:ad and ssid 'VirtualAP'
wlan1_rename: Setup of interface done.
MGMT (TX callback) ACK

But no other stations are able to see this Virtual AP and no more frames are sent from the VAP.

If someone ever try something similar please let me know.

Thanks

Lorna

Signature · 2 lines
GRATIS! Movie-FLAT mit ?ber 300 Videos. 
Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome
#1 lore raw
Quoted 7 lines · Lorna Gonz?lez

After trying to build two virtual interfaces, one as a STA and another one as AP on mac80211 with an AR928X, creating a new interface with:

iw phy phy0 interface add wlan1 type __ap

I got a new interface called wlan1_rename, the one I used to build the AP interface.

But no other stations are able to see this Virtual AP and no more frames are sent from the VAP.

How did you set the MAC addresses on the interfaces? Based on a quick test, I was able to get hostapd running on the interface created with the command above at least when not changing the address on the created interface. A station was able to see the AP and associate. Then I changed the MAC address of the original interface by setting locally administered bit (02:<rest of addr>) and I was able to associate it as a station to an AP that was running on the same channel. The ping from the virtual AP interface was still going through.

Just keep in mind that not all combinations will work as far as key setup is concerned. In other words, you may be able to get associated with multiple interfaces, but the data frames may not get through if the driver is not yet ready to the setup you tested. These will be eventually addressed for most cases, but for now, you may also want to experiment with nohwcrypt=1 if you see something that could be caused by this.

- Jouni

#2 lore raw

Hello

I finally got a station an a virtual AP working on the same channel using the setup below. I made some test sending TCP through iperf between the AP and the station and the VAP to a station associated with it. Using an AP operating with Ieee802.11n, an atheros AR928X and without virtual interfaces I get a max throughput of 50 MBits/s.
As soon as I start using my desired setup, the thoughput of the station is about 15 MBits/s... I actually need to make the rate fixed using iwconfig to get this max. Otherwise the traffic is sent at 1 MBit/s.

Can someone please tell me how is the behaviour of the rate control in case of virtual interfaces on mac80211?

Thanks in advanced

Lorna Gonz?lez.

-------- Original-Nachricht --------

Quoted 38 lines

Datum: Thu, 28 Oct 2010 11:03:47 +0300
Von: Jouni Malinen <[email protected]>
An: "\\"Lorna Gonz?lez"" <[email protected]>
CC: "ath9k-devel at lists.ath9k.org" <[email protected]>
Betreff: Re: [ath9k-devel] ath9k: Virtual interface as AP

Quoted 1 line · Lorna Gonz?lez

After trying to build two virtual interfaces, one as a STA and another

one as AP on mac80211 with an AR928X, creating a new interface with:

Quoted 4 lines

iw phy phy0 interface add wlan1 type __ap

I got a new interface called wlan1_rename, the one I used to build the

AP interface.

Quoted 1 line

But no other stations are able to see this Virtual AP and no more frames

are sent from the VAP.

How did you set the MAC addresses on the interfaces? Based on a quick test, I was able to get hostapd running on the interface created with the command above at least when not changing the address on the created interface. A station was able to see the AP and associate. Then I changed the MAC address of the original interface by setting locally administered bit (02:<rest of addr>) and I was able to associate it as a station to an AP that was running on the same channel. The ping from the virtual AP interface was still going through.

Just keep in mind that not all combinations will work as far as key setup is concerned. In other words, you may be able to get associated with multiple interfaces, but the data frames may not get through if the driver is not yet ready to the setup you tested. These will be eventually addressed for most cases, but for now, you may also want to experiment with nohwcrypt=1 if you see something that could be caused by this.

- Jouni

Signature · 2 lines
GMX DSL Doppel-Flat ab 19,99 &euro;/mtl.! Jetzt auch mit 
gratis Notebook-Flat! http://portal.gmx.net/de/go/dsl
#3 lore raw
Quoted 8 lines · Lorna Gonz?lez

Hello

I finally got a station an a virtual AP working on the same channel using the setup below. I made some test sending TCP through iperf between the AP and the station and the VAP to a station associated with it. Using an AP operating with Ieee802.11n, an atheros AR928X and without virtual interfaces I get a max throughput of 50 MBits/s.
As soon as I start using my desired setup, the thoughput of the station is about 15 MBits/s... I actually need to make the rate fixed using iwconfig to get this max. Otherwise the traffic is sent at 1 MBit/s.

Can someone please tell me how is the behaviour of the rate control in case of virtual interfaces on mac80211?

Can you give a more detailed description/diagram of your virtual AP setup and network throughput test? It sounds like you are using the same radio as AP and STA? If so, then of course you are going to get less bandwidth on the VIFS because they have to share the radio.

I'm not sure it should drop all the way to 15Mbps, though. We haven't done a lot of throughput testing yet, but if we use two STA vifs on the ath9k box connected to an 80211n AP (trendnet), then we can set a max of about 9Mbps tx + rx across each STA (the STAs are sending to each other). That is around 40Mbps total tx + rx across the radio.

Thanks,
Ben

Signature · 2 lines
Ben Greear <[email protected]>
Candela Technologies Inc  http://www.candelatech.com
#4 lore raw

Hi Ben,

My scenario looks like this:
wlan0 operates as an AP using hostapd and it is associated to aclient a wlan1 virtual interface is in managed mode and associated to an Ieee 802.11n AP. They share the same channel.
When I measure the throughput with TCP streams in jperf I get following:

#5 lore raw
Quoted 13 lines · Lorna Gonz?lez

Hi Ben,

My scenario looks like this:
wlan0 operates as an AP using hostapd and it is associated to aclient a wlan1 virtual interface is in managed mode and associated to an Ieee 802.11n AP. They share the same channel.
When I measure the throughput with TCP streams in jperf I get following:

Quoted 2 lines

From wlan1 to the AP = 14,4 MBits/s
From wlan0 to the AP = 8 MBits/s (wlan0 is far away from the VAP and AP)

Both sending traffic at the same time:

Quoted 2 lines

From wlan1 to the AP = 12 MBits/s
From wlan0 to the AP = 1,6 MBits/s (?)

I'm perhaps not thinking well this morning, but I am having trouble understanding your network.

Can you please draw an ascii or other form of diagram?

Thanks,
Ben

Quoted 56 lines

Like you said, it is low because both interfaces share the medium but if I don?t change the rate using iwconfig, this values or at least the first one goes down until 1,5 MBits. That?s way I wonder if there is something that keeps the rate low by the time a virtual interface is created.

Thanks for your response

Best regards

Lorna

-------- Original-Nachricht --------

Quoted 44 lines

Datum: Thu, 11 Nov 2010 09:00:45 -0800
Von: Ben Greear<[email protected]>
An: "Lorna Gonz?lez"<[email protected]>
CC: Jouni Malinen<[email protected]>, ath9k-devel at venema.h4ckr.net
Betreff: Re: [ath9k-devel] ath9k: Virtual interface as AP

Quoted 4 lines · Lorna Gonz?lez

Hello

I finally got a station an a virtual AP working on the same channel

using the setup below. I made some test sending TCP through iperf between the AP and the station and the VAP to a station associated with it.

Quoted 1 line

Using an AP operating with Ieee802.11n, an atheros AR928X and without

virtual interfaces I get a max throughput of 50 MBits/s.

Quoted 1 line

As soon as I start using my desired setup, the thoughput of the station

is about 15 MBits/s... I actually need to make the rate fixed using iwconfig to get this max. Otherwise the traffic is sent at 1 MBit/s.

Quoted 2 lines

Can someone please tell me how is the behaviour of the rate control in

case of virtual interfaces on mac80211?

Can you give a more detailed description/diagram of your virtual AP setup and
network throughput test? It sounds like you are using the same radio as AP
and STA? If so, then of course you are going to get less bandwidth on the VIFS because they have to share the radio.

I'm not sure it should drop all the way to 15Mbps, though. We haven't done a lot of throughput
testing yet, but if we use two STA vifs on the ath9k box connected to an 80211n AP (trendnet),
then we can set a max of about 9Mbps tx + rx across each STA (the STAs are sending to each other).
That is around 40Mbps total tx + rx across the radio.

Thanks,
Ben

--
Ben Greear<[email protected]>
Candela Technologies Inc http://www.candelatech.com

Signature · 2 lines
Ben Greear <[email protected]>
Candela Technologies Inc  http://www.candelatech.com