OpenWRT WDS Bridging

I’ve had a pile of kit to configure recently for an office I’ve been setting up. Amongst the units I specified the second Linksys WRT54GL I’ve had the opportunity to play with.

My one runs White Russian but I took the plunge and went with the latest Kamikaze 7.09 release. It’s a little different to what I’d fiddled with before but probably more intuitive to configure with files rather than nvram variables. I’m briefly going to describe how to configure a wired switch bridged to the wireless network running WDS to the main site router (serving DHCP and DNS).

From a freshly unpacked WRT54GL, connect the ethernet WAN uplink to your internet connection and one of the LAN downlinks to a usable computer. By default the WRT DHCPs the WAN connection and serves DHCP on the 192.168.1 subnet to its LAN.

Download the firmware to the computer then login to the WRT on 192.168.1.1, default account admin/admin.  Upload the image to the firmware upgrade form. Wait for the upload to finish and the router to reboot.

Once it’s rebooted you may need to refresh the DHCP lease on the computer but the default subnet range is the same iirc. telnet to the router on the same address and login as root, no password. Change the password and the SSH service is enabled and telnet service disabled.

I personally prefer using the the x-wrt interface with the Zephyr theme so I install x-wrt by editing /etc/ipkg.conf and appending “src X-Wrt http://downloads.x-wrt.org/xwrt/kamikaze/7.09/brcm-2.4/packages”. Back in the shell run ipkg update ; ipkg install webif . Once completed you should be able to browse to the router’s address (hopefully still 192.168.1.1) and continue the configuration. You may wish to install matrixtunnel for SSL support in the web administration interface.

I want to use this WRT both to extend the coverage of my client’s office wireless network and to connect a handful of wired devices (1 PC, 1 Edgestore NAS and a NSLU2).

So step one is to assign the router a LAN address on my existing network. The WAN port is going to be ignored (although bridging that in as well is probably possible too). In X-wrt under Networks I set a static IP of 192.168.1.253 , netmask of 255.255.255.0 and a router of 192.168.1.254 – the existing main router; BT homehub serving the LAN and whose wireless we’ll be bridging to. The LAN connection type is bridged. DNS in this case is the same as the main router. I’ve left the WAN as DHCP for convenience though the plan is not to use it. Save the settings and apply.

Under Wireless turn the radio on and set the channel to the same as the main router. Choose lan to bridge the wireless network to, set mode to Access Point, WDS on, broadcast ESSID to your personal preference (I set on) and AP isolation off. The ESSID itself needs to be the existing name for your network and encryption set appropriately to match. Save and apply.

Now the magic bit – I’m told this should go in the BSSID box which only seems to be present when mode is set to WDS. What needs to happen is that the WRT needs to know which existing AP to bridge to. Under the hood it’s done using the command wlc wds main-ap-mac-address-here and not having an appropriate text box to put it in it’s almost always possible to fiddle with the startup file. It’s a hack for sure but it seems to work ok for me!

Lo! A WDS bridge.

Update 2007-01-07: After installing the bridge on-site I had to reconfigure it in Client mode using the regular WDS settings as that seemed to be the only way to make it communicate with the Homehub. Pity – that way it doesn’t extend the wireless range, just hooks up anything wired to it. It worked fine when I set it up talking to my wrt.