1 (edited by JDP 2012-04-29 05:13:26)

Topic: WDS problem on 2x WRT54G running Backfire 2.4

My current network is:
cable modem <-> WRT54G v4.0 running the bcrm-2.4 of Backfire <-> WiFi G network with WPA2

I've been trying to follow http://wiki.openwrt.org/doc/recipes/broadcomwds to add a WRT54G v2.0 running the same Backfire to wire up all the devices in my media center. So far I have no luck. There's a lot of info about setting up WDS, but it seems to skip pointing out some things that I see but don't really find a full explanation of and I'm not sure why my setup isn't working. For one, does the WDS network have to be the same SSID as the AP network (and thus use the same encryption/key of course)? Does 802.11h work with Broadcom WDS on Backfire (yet)? Does the G-Turbo mode work with WDS or do I need to leave it on G only? I've played in LuCI setting stuff up and it doesn't work, and I've gone in with SSH and played around, still nada. It looks like LuCI doesn't give options to set up encryption with WDS. If so, is that on purpose? There're a few other media devices on my network the will still use the AP directly over WiFi and reentering passkeys won't be fun all the time so I'd like to keep the AP setup with WPA2 that I've got if it's possible. Do I need to keep the WDS link encrypted if the AP is or can I let it go open? Nothing much sensitive will be going over the link, mostly streamed av media.

EDIT: Since I'm not trying to extend the WiFi coverage, is it possible to make this work without setting an AP on the Secondary WRT? In my testing it seems the Secondary will come up, fail to make any connection with the Primary but will then grab active wireless connections to the network and break anything currently running when it is brought up, eg a Netflix stream to the TV, etc. I'd like for WiFi connections to go to the Primary at all times and only what is wired to the Secondary be send over the WDS and the Secondary to ignore general incoming WiFi traffic. However, I've read posts that say WDS needs an AP setup on the client to work with encryption...

Primary WRT

jon@leon:~$ ssh root@192.168.1.1
root@192.168.1.1's password: 


BusyBox v1.15.3 (2011-11-24 02:12:13 CET) built-in shell (ash)
Enter 'help' for a list of built-in commands.

  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 Backfire (10.03.1, r29592) ------------------------
  * 1/3 shot Kahlua    In a shot glass, layer Kahlua 
  * 1/3 shot Bailey's  on the bottom, then Bailey's, 
  * 1/3 shot Vodka     then Vodka.
 ---------------------------------------------------
root@OpenWrt:~# uname -a
Linux OpenWrt 2.4.37.9 #12 Wed Dec 21 03:33:39 CET 2011 mips GNU/Linux
root@OpenWrt:~# cat /etc/config/wireless 

config 'wifi-device' 'wl0'
    option 'type' 'broadcom'
    option 'channel' '5'
    option 'txantenna' '3'
    option 'rxantenna' '3'
    option 'txpower' '18'
    option 'hwmode' '11g'

config 'wifi-iface'
    option 'device' 'wl0'
    option 'network' 'lan'
    option 'mode' 'ap'
    option 'ssid' 'OpenWrt'
    option 'encryption' 'psk2'
    option 'key' 'sekritkey'
#    option 'doth' '1'
#    option 'wmm' '1'

config 'wifi-iface'
    option 'device' 'wl0'
    option 'mode' 'wds'
    option 'network' 'lan'
#    option 'doth' '1'
#    option 'wmm' '1'
    option 'ssid' 'OpenWrt'
    option 'bssid' 'xx:xx:xx:xx:xx:xx'
    option 'encryption' 'psk2'
    option 'key' 'sekritkey'
root@OpenWrt:~#

Secondary WRT

bodhi@bodhi:~$ sudo ifconfig eth0 192.168.1.183
bodhi@bodhi:~$ ssh root@192.168.1.2
root@192.168.1.2's password: 


BusyBox v1.15.3 (2011-11-24 02:12:13 CET) built-in shell (ash)
Enter 'help' for a list of built-in commands.

  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 Backfire (10.03.1, r29592) ------------------------
  * 1/3 shot Kahlua    In a shot glass, layer Kahlua 
  * 1/3 shot Bailey's  on the bottom, then Bailey's, 
  * 1/3 shot Vodka     then Vodka.
 ---------------------------------------------------
root@OpenWrt-media:~# uname -a
Linux OpenWrt-media 2.4.37.9 #12 Wed Dec 21 03:33:39 CET 2011 mips GNU/Linux
root@OpenWrt-media:~# cat /etc/config/wireless 

config 'wifi-device' 'wl0'
    option 'type' 'broadcom'
    option 'channel' '5'
    option 'txpower' '18'
    option 'hwmode' '11g'
    option 'txantenna' '3'
    option 'rxantenna' '3'

config 'wifi-iface'
    option 'device' 'wl0'
    option 'mode' 'ap'
    option 'ssid' 'OpenWrt'
    option 'network' 'lan'
#    option 'doth' '1'
#    option 'wmm' '1'
    option 'encryption' 'psk2'
    option 'key' 'sekritkey'

config 'wifi-iface'
    option 'device' 'wl0'
    option 'network' 'lan'
    option 'mode' 'wds'
    option 'bssid' 'yy:yy:yy:yy:yy:yy'
    option 'ssid' 'OpenWrt'
#    option 'doth' '1'
#    option 'wmm' '1'
    option 'encryption' 'psk2'
    option 'key' 'sekritkey'
root@OpenWrt-media:~#
WRT54G v4.0 - Backfire bcrm-2.4 : WRT54G v2.0 32MB RAM stock, SD card mod - Backfire bcrm-2.4

2 (edited by JDP 2012-04-29 11:05:59)

Re: WDS problem on 2x WRT54G running Backfire 2.4

Got to do some testing since everyone else went to bed and breaking the network won't generate howls of unhappy family members. Disabled all wireless security and the WDS came right up. Disabled the AP wifi-iface on the Secondary and the WDS still came up working. Turned the security back on in variations of psk, psk2, psk+psk2 and nothing would work. Could it be that the chipsets are a few versions apart? Getting similar hardware seems to be the best way to get WDS with WPA2 going, and the v4.0 is when they went to the SoC with the BCM5352. I have a WRT54GS installed at a friends that I might be able to take and use if it is a chipset problem and I can verify that it is the same as one of these WRTs already in the mix. Sheesh, maybe it's time to go thrift store shopping and hope for a lucky find of an exact version match.

EDIT:
I'd had no luck randomly playing with multi-SSIDs to see if that would be a work around and the wiki entry for it is empty... I found https://forum.openwrt.org/viewtopic.php?pid=146993 where I found that I had a compatible router with the v4.0 and it needed to reboot to use multiple SSIDs instead of just putting the wifi up/down from the CLI. It worked in that it created two networks, but even with the WDS section marked with "option ssid WDS" the same as the second network, OpenWRT attached it to the first network "OpenWrt". Messing around even further, I found that setting the SSID in the wds wifi-iface section didn't effect anything on either side of the WDS link. I removed the SSID setting from the Secondary and it kept coming up on an unencrypted link. Then I hit the break through! wds was always coming up on the wl0 interface. I swapped around the config order of the networks and put the SSID "WDS" unencrypted network first, then the SSID "OpenWrt" WPA2 network second followed by the wds section that defined the MAC addr to talk to. Reboot and it's working! No where did I remember reading that WDS _only_ attached to the first interface, and trying to specify "wl0.1" in the wds config section kept giving me errors. So, now that it works I thought of trying WEP with the WDS just to give me some sort of security. Still no dice. Oh well, at least I still get the main G user network encrypted.

tl/dr Headaches, but it turns out that WDS attaches to the first network on wl0 and inherits all of its settings. Sort your network list accordingly for desired results. Encryption is still a dicey affair on WDS.

Primary:

jon@leon:~$ ssh root@192.168.1.1
root@192.168.1.1's password: 


BusyBox v1.15.3 (2011-11-24 02:12:13 CET) built-in shell (ash)
Enter 'help' for a list of built-in commands.

  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 Backfire (10.03.1, r29592) ------------------------
  * 1/3 shot Kahlua    In a shot glass, layer Kahlua 
  * 1/3 shot Bailey's  on the bottom, then Bailey's, 
  * 1/3 shot Vodka     then Vodka.
 ---------------------------------------------------
root@OpenWrt:~# uname -a 
Linux OpenWrt 2.4.37.9 #12 Wed Dec 21 03:33:39 CET 2011 mips GNU/Linux
root@OpenWrt:~# cat /etc/config/wireless 

config 'wifi-device' 'wl0'
    option 'type' 'broadcom'
    option 'channel' '5'
    option 'txantenna' '3'
    option 'rxantenna' '3'
    option 'txpower' '18'
    option 'hwmode' '11gst'

config 'wifi-iface'
    option 'device' 'wl0'
    option 'network' 'lan'
    option 'ssid' 'WDS'
    option 'mode' 'ap'
    option 'doth' '1'
    option 'wmm' '1'
    option 'key' '1'
    option 'encryption' 'none'

config 'wifi-iface'
    option 'device' 'wl0'
    option 'network' 'lan'
    option 'ssid' 'OpenWrt'
    option 'mode' 'ap'
    option 'doth' '1'
    option 'wmm' '1'
    option 'encryption' 'psk+psk2'
    option 'key' 'sekritkey'

config 'wifi-iface'
    option 'device' 'wl0'
    option 'ssid' 'WDS'
    option 'mode' 'wds'
    option 'network' 'lan'
    option 'bssid' 'xx:xx:xx:xx:xx:xx'

root@OpenWrt:~#

Secondary:

jon@leon:~$ ssh root@192.168.1.2
root@192.168.1.2's password: 


BusyBox v1.15.3 (2011-11-24 02:12:13 CET) built-in shell (ash)
Enter 'help' for a list of built-in commands.

  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 Backfire (10.03.1, r29592) ------------------------
  * 1/3 shot Kahlua    In a shot glass, layer Kahlua 
  * 1/3 shot Bailey's  on the bottom, then Bailey's, 
  * 1/3 shot Vodka     then Vodka.
 ---------------------------------------------------
root@OpenWrt-media:~# uname -a
Linux OpenWrt-media 2.4.37.9 #12 Wed Dec 21 03:33:39 CET 2011 mips GNU/Linux
root@OpenWrt-media:~# cat /etc/config/wireless 

config 'wifi-device' 'wl0'
    option 'type' 'broadcom'
    option 'channel' '5'
    option 'txpower' '18'
    option 'hwmode' '11gst'
    option 'txantenna' '3'
    option 'rxantenna' '3'

config 'wifi-iface'
    option 'device' 'wl0'
    option 'network' 'lan'
    option 'mode' 'wds'
    option 'bssid' 'yy:yy:yy:yy:yy:yy'
    option 'doth' '1'
    option 'wmm' '1'
root@OpenWrt-media:~#

If you read really closely you've seen that the machine sshing to OpenWrt-media is different than my original post. That's because with the WDS now working everything seems to be going over the link nicely and in the OP I was working on the Secondary via a laptop wired to a LAN port. Once WDS is up it's pretty durn nice!

WRT54G v4.0 - Backfire bcrm-2.4 : WRT54G v2.0 32MB RAM stock, SD card mod - Backfire bcrm-2.4

Re: WDS problem on 2x WRT54G running Backfire 2.4

All wds nodes *must* contain both a wifi-iface in wds mode and a wifi-iface in ap mode, with the *same* crpyto settings in both.
If no ap iface is given along the wds iface, it will not come up properly (at least not when using wpa).

Re: WDS problem on 2x WRT54G running Backfire 2.4

I just gave that a spin. No go. I can add a ap wifi-iface on the Secondary and things still work. When I try to add encryption it fails with both psk and psk2. These are my working configs ATM, and if I uncomment the lines the main network still functions and the WDS never links. No errors on OpenWrt-media/Secondary when I put wifi down/up, and I reboot OpenWrt/Primary because of the bug in the previous link.

Primary:

root@OpenWrt:~# cat /etc/config/wireless 

config 'wifi-device' 'wl0'
    option 'type' 'broadcom'
    option 'channel' '5'
    option 'txantenna' '3'
    option 'rxantenna' '3'
    option 'txpower' '18'
    option 'hwmode' '11gst'

config 'wifi-iface'
    option 'device' 'wl0'
    option 'network' 'lan'
    option 'ssid' 'WDS'
    option 'mode' 'ap'
    option 'doth' '1'
    option 'wmm' '1'
#    option 'encryption' 'psk'
#    option 'key' 'zzxyz'

config 'wifi-iface'
    option 'device' 'wl0'
    option 'network' 'lan'
    option 'ssid' 'OpenWrt'
    option 'mode' 'ap'
    option 'doth' '1'
    option 'wmm' '1'
    option 'encryption' 'psk+psk2'
    option 'key' 'sekritkey'

config 'wifi-iface'
    option 'device' 'wl0'
    option 'ssid' 'WDS'
    option 'mode' 'wds'
    option 'network' 'lan'
    option 'bssid' 'xx:xx:xx:xx:xx:xx'
#    option 'encryption' 'psk'
#    option 'key' 'zzxyz'

Secondary:

root@OpenWrt-media:~# cat /etc/config/wireless

config 'wifi-device' 'wl0'
    option 'type' 'broadcom'
    option 'channel' '5'
    option 'txpower' '18'
    option 'hwmode' '11gst'
    option 'txantenna' '3'
    option 'rxantenna' '3'

config 'wifi-iface'
    option 'device' 'wl0'
    option 'network' 'lan'
    option 'mode' 'ap'
    option 'ssid' 'WDS'
    option 'doth' '1'
    option 'wmm'
#    option 'encryption' 'psk'
#    option 'key' 'zzxyz'
    
config 'wifi-iface'
    option 'device' 'wl0'
    option 'network' 'lan'
    option 'ssid' 'WDS'
    option 'mode' 'wds'
    option 'bssid' 'yy:yy:yy:yy:yy:yy'
    option 'doth' '1'
    option 'wmm' '1'
#    option 'encryption' 'psk'
#    option 'key' 'zzxyz'
WRT54G v4.0 - Backfire bcrm-2.4 : WRT54G v2.0 32MB RAM stock, SD card mod - Backfire bcrm-2.4

Re: WDS problem on 2x WRT54G running Backfire 2.4

brcm-2.4 to brcm-2.4 wds used to work fine for me with 10.03.1, but it is mandatory that ap and wds iface use the very same crypto settings. Establishing a psk2 wds should be possible.