1 (edited by projectgus 2010-09-12 03:40:22)

Topic: WDS repeater bridging with Atheros on Backfire.1RC3 (working config)

I found a lot of mixed information about WDS & bridging so I thought I'd post a success story - access point is a Fonera, repeater is an Asus WL-500gP v1 with the broadcom wifi card swapped out for an Atheros 5k one. WPA-PSK2 encryption. Using Backfire 10.03.1RC3 (latest.)

Actually, everything but one detail matches the official Atheros WDS documentation, which was great.

The one detail was that I had to manually add the "ath0.sta0" interface to the bridge on the access point side. But I'll reproduce my config files here in full, for folks to look at.

I've found that sometimes if the AP restarts I need to proactively restart the repeater for it to successfully reconnect, but not always.

Access point (Fonera)

Relevant part of /etc/config/network

config interface lan
    option type bridge
# tweaked so that sta0 will come up automatically
    option ifname "ath0 ath0.sta0"
    option proto    static
    option ipaddr    192.168.9.1
    option netmask    255.255.255.0

Note the explicit adding of ath0 and ath0.sta0 to the bridge. Should not be necessary, but I found it was.
Note that eth0 is not part of the bridge on the Fonera, I'm using it as a WAN interface.

/etc/config/wireless

config wifi-device  wifi0
    option type     atheros
    option channel  5

config wifi-iface
    option device    wifi0
    option network    lan
    option mode    ap
    option ssid        MyNet
    option wds     1    
    option encryption psk2
    option key supersecret

Repeater (Asus WL-500gP+Ath5k)

Relevant part of /etc/config/network

config 'interface' 'lan'
    option 'ifname' 'eth0.0'
    option 'type' 'bridge'
    option 'proto' 'static'
    option 'ipaddr' '192.168.9.2'
    option 'netmask' '255.255.255.0'
    option 'gateway' '192.168.9.1'
    option 'dns' '192.168.9.1'

Note that in the repeater, eth0 is bridged to the wireless LAN


/etc/config/wireless

config wifi-device  radio0
    option type mac80211
    option macaddr    00:16:ce:1c:4c:fa
    option channel 5

config wifi-iface
    option device   radio0
    option network  lan
    option mode     sta
    option ssid     MyNet
    option encryption psk2
    option wds 1
    option key supersecret

I'm not certain if it's necessary to explicitly specify the channel on both AP & repeater, however I originally had it set to "channel auto" on the AP and this seemed to not work (repeater would drop off after a while.)

Hth.

2 (edited by fyi 2010-09-25 08:06:24)

Re: WDS repeater bridging with Atheros on Backfire.1RC3 (working config)

Where do you create ath0.sta0 in Fonera? Do we have to specify BSSID in both ap and sta?

I have another question that for a repeater there're ap and sta in one device. Which one is initialized first? Suppose the channel in the access point is auto and not fixed. Do we have to write a shell script for the repeater to let sta mode come first and use uci command to set the channel of ap mode? Probably we should also create a cron job to periodically check the sta mode whether the connection is dropped.

Re: WDS repeater bridging with Atheros on Backfire.1RC3 (working config)

Ap first.

Heres my working /etc/config/wireless


config 'wifi-device' 'wlan'
    option 'type' 'mac80211'
    option 'channel' '6'
    option 'macaddr' '94:0C:6D:AF:60:F8'
    option 'hwmode' '11ng'
    list 'ht_capab' 'SHORT-GI-40'
    list 'ht_capab' 'DSSS_CCK-40'
    option 'htmode' 'HT20'
    option 'disabled' '0'

config 'wifi-iface'
    option 'device' 'wlan'
    option 'encryption' 'none'
    option 'isolate' '0'
    option 'bgscan' '0'
    option 'ssid' 'HotSpot'
    option 'network' 'lan'
    option 'mode' 'ap'
    option 'wds' '1'
    option 'hidden' '0'
    option 'macfilter' 'none'
    option 'disabled' '0'
   
config 'wifi-iface'
    option 'device' 'wlan'
    option 'encryption' 'none'
    option 'isolate' '0'
    option 'bgscan' '0'
    option 'ssid' 'dlink'
    option 'network' 'wan'
    option 'mode' 'sta'
    option 'wds' '1'
    option 'hidden' '0'
    option 'macfilter' 'none'
    option 'disabled' '0'

*****

In order to get both working there is also an edit mentioned in another post somewhere.

/etc/modules.d/27-ath9k
ath9k_hw
ath9k_common
ath9k nohwcrypt=1


These two files were all that was necessary to get ap/sta on a single unit.
This is for /trunk on a TPlink 1043nd (ath9)

4 (edited by projectgus 2010-09-29 04:08:02)

Re: WDS repeater bridging with Atheros on Backfire.1RC3 (working config)

fyi wrote:

Where do you create ath0.sta0 in Fonera? Do we have to specify BSSID in both ap and sta?

I found that ath0.sta0 is created automatically behind the scenes for the repeater to use. However, it wasn't added to the bridge automatically when I did it, which is why I referenced it explicitly in the config file. I think if it worked as-designed, you would not need to know about it at all.

I did not set a BSSID at all, I found it worked with the SSID only (subject to that caveat.)

Re: WDS repeater bridging with Atheros on Backfire.1RC3 (working config)

projectgus wrote:

I did not set a BSSID at all, I found it worked with the SSID only (subject to that caveat.)

I just figure out that you have enabled lazy-WDS by "option wds 1."

Re: WDS repeater bridging with Atheros on Backfire.1RC3 (working config)

my first AP dont support Openwrt and i cant configure this for WDS.... I want configure the second AP that repeat a signal of basic AP and have a ip in the same subnet

FIRST-AP(192.168.0.x/24)<--->WIFI<-----> SECOND-AP-OPENWRT (192.168.0.x/24)<------->phisical network (192.168.0.x/24 with cable)


sorry form my english...

Re: WDS repeater bridging with Atheros on Backfire.1RC3 (working config)

Hi,

i have a Buffalo WZR-HP-G300NH and a Linksys WRT160NL both running BackFire 10.03.1-rc3.
I just configured WDS via LuCi and it seems to work somehow. Buffalo is configured as AP and Linksys as STA.

I can:

- ping from Buffalo to Linksys
- ping from Linksys to Buffalo
- ping from wireless client (notebook) to both Buffalo and Linksys
- ssh from Buffalo to Linksys
- ssh from Linksys to Buffalo
- ssh from wireless client (notebook) to Buffalo
- open LuCi webinterface to Buffalo from wireless client (notebook)

i can not:
- ssh from wireless client (notebook) to Linksys
- open LuCi webinterface to Linksys from wireless client (notebook)

This seems a bit strange for me. What could be the reason(s) that i can't ssh or open LuCi from client to the STA?

Here's my config:

Buffalo, AP:

/etc/config/network:

config 'interface' 'lan'
    option 'ifname' 'eth0'
    option 'proto' 'static'
    option 'netmask' '255.255.255.0'
    option 'ipaddr' '192.168.2.1'
    option 'defaultroute' '0'
    option 'peerdns' '0'
    option 'type' 'bridge'
    option 'dns' ' 8.8.8.8'

/etc/config/wireless:

config 'wifi-device' 'radio0'
    option 'type' 'mac80211'
    option 'macaddr' '00:1d:73:b1:91:d1'
    list 'ht_capab' 'SHORT-GI-40'
    list 'ht_capab' 'DSSS_CCK-40'
    option 'disabled' '0'
    option 'country' 'DE'
    option 'distance' '20'
    option 'channel' '8'
    option 'hwmode' '11g'

config 'wifi-iface'
    option 'device' 'radio0'
    option 'network' 'lan'
    option 'mode' 'ap'
    option 'isolate' '0'
    option 'bgscan' '0'
    option 'macfilter' 'none'
    option 'ssid' 'ssid'
    option 'encryption' 'psk2'
    option 'key' 'secret'
    option 'wds' '1'

Linksys, STA:

/etc/config/network:

config 'interface' 'lan'
    option 'ifname' 'eth0'
    option 'type' 'bridge'
    option 'proto' 'static'
    option 'netmask' '255.255.255.0'
    option 'defaultroute' '0'
    option 'peerdns' '0'
    option 'ipaddr' '192.168.2.2'
    option 'gateway' '192.168.2.1'
    option 'dns' '192.168.2.1'

/etc/config/wireless:

config 'wifi-device' 'radio0'
    option 'type' 'mac80211'
    option 'macaddr' '68:7f:74:06:b8:3a'
    list 'ht_capab' 'SHORT-GI-40'
    list 'ht_capab' 'DSSS_CCK-40'
    option 'hwmode' '11g'
    option 'channel' '8'
    option 'disabled' '0'

config 'wifi-iface'
    option 'device' 'radio0'
    option 'network' 'lan'
    option 'ssid' 'ssid'
    option 'mode' 'sta'
    option 'wds' '1'
    option 'encryption' 'psk2'
    option 'key' 'secret'

any idea, what might be wrong?

thanks,
daniel

Re: WDS repeater bridging with Atheros on Backfire.1RC3 (working config)

It's probably worth mentioning that the madwifi and ath{5,9}k drivers may have very different properties in this regard - in particular, this:

config interface lan
    option type bridge
# tweaked so that sta0 will come up automatically
    option ifname "ath0 ath0.sta0"
    option proto    static
    option ipaddr    192.168.9.1
    option netmask    255.255.255.0

was unnecessary for me using ath9k.  Simply stating that the wifi-iface was part of a network that was of type 'bridge' was enough.  This is on a DIR-825 B1 using the Backfire SVN r23429.  I did, however, recompile the image so that CONFIG_ATH_USER_REGD=y was enabled, as without that, my device (and possibly others) simply can't be configured to use the correct regulatory domain.

My /etc/config/wireless:
config 'wifi-device' 'radio0'
    option 'type' 'mac80211'
    option 'macaddr' '00:26:5a:fa:28:b1'
    option 'hwmode' '11ng'
    list 'ht_capab' 'SHORT-GI-40'
    list 'ht_capab' 'TX-STBC'
    list 'ht_capab' 'RX-STBC1'
    list 'ht_capab' 'DSSS_CCK-40'
    option 'htmode' 'HT40-'
    option 'country' 'AU'
    option 'disabled' '0'
    option 'channel' '9'

config 'wifi-iface'
    option 'device' 'radio0'
    option 'network' 'lan'
    option 'mode' 'ap'
    option 'ssid' 'MVDK-OW'
    option 'encryption' 'psk2'
    option 'key' 'supersecret'

config 'wifi-device' 'radio1'
    option 'type' 'mac80211'
    option 'macaddr' '00:26:5a:fa:28:b2'
    option 'hwmode' '11na'
    list 'ht_capab' 'SHORT-GI-40'
    list 'ht_capab' 'TX-STBC'
    list 'ht_capab' 'RX-STBC1'
    list 'ht_capab' 'DSSS_CCK-40'
    option 'country' 'AU'
    option 'channel' '108'
    option 'disabled' '0'
    option 'htmode' 'HT40+'

config 'wifi-iface'
    option 'device' 'radio1'
    option 'network' 'lan'
    option 'mode' 'ap'
    option 'ssid' 'MVDK-WDS'
    option 'encryption' 'psk2'
    option 'key' 'supersecret'
    option 'wds' '1'

Cheers,

Michael

Re: WDS repeater bridging with Atheros on Backfire.1RC3 (working config)

Guys,

Thanks a lot for interesting info.

Has someone tried configurations:
1)  WDS AP (native firmware) <--> WDS STA (OpenWrt)
and
2)  WDS AP (OpenWrt)           <--> WDS STA (native firmware)

I assume here that both AP and STA use same chipset (Atheros)

I have now at my hands TP-Link WR841ND Wireless router and TP-Link WA801ND Access Point.
WDS between those two works fine. Both are using native firmware at a moment.

My plan is to flash WR841ND with OpenWrt, and use it as WDS AP.  And keep native firmware for WA801ND AP - as it supports Client mode, Repeater and WDS out of the box.

UI of both boxes:
WR841ND Wireless Router
WA801ND Access Point

Status page for WN841ND displays following modes for WDS:
- Disabled
- Assoc
- Running

WA801ND Status page doesn't provide such info.
This certainly needs improvement! :-)

Re: WDS repeater bridging with Atheros on Backfire.1RC3 (working config)

i just noticed, that i get the login screen to LuCi correct, but when i login, the header is visible (i already cleared the cache in firefox, so it really is loaded) and then the page takes forever to load.
when i reboot the linksys, i can login and it works for about 5 to 10 minutes (LuCi loads, i can ssh into the router etc.). after that time the connection is stalled again.

Re: WDS repeater bridging with Atheros on Backfire.1RC3 (working config)

vplessky wrote:

Has someone tried configurations:
1)  WDS AP (native firmware) <--> WDS STA (OpenWrt)
and
2)  WDS AP (OpenWrt)           <--> WDS STA (native firmware)

I assume here that both AP and STA use same chipset (Atheros)

I have now at my hands TP-Link WR841ND Wireless router and TP-Link WA801ND Access Point.
WDS between those two works fine. Both are using native firmware at a moment.

My plan is to flash WR841ND with OpenWrt, and use it as WDS AP.  And keep native firmware for WA801ND AP - as it supports Client mode, Repeater and WDS out of the box.

Follow-up on my plan above.

I flashed WR841ND with OpenWrt/Gargoyle 1.3.8
And bought one more router - TP-Link WR1043ND

WDS works very well between WR1043ND (native factory firmware) and WR841ND (OpenWrt/Gargoyle).
Access Point WA801ND (native firmware) connects to WR841ND in Repeater mode.
This works well too.