Just moozing

Before you can check your notes, you must make them…

OpenWrt and WDS

with one comment

I try to set up a wireless bridge. This post was to be about what is not working, but while documenting and retracing my step, it started working!

The setup

The system I want to set up is shown in the diagram (click for larger image). There are two distinct LANs, Remote LAN and main LAN. Main LAN is the primary LAN that includes some other Wifi, servers, desktop and so on. The remote LAN will only have few connected machines. It is needed since it is physically located in a different building.

The WDS bridge is to be set up between the two Asus routers. The first one is a small Asus WL-520g. It has something like 8 Mb of RAM and 2Mb of flash, so if I were to flash it with OpenWrt, it would be a very limited version. I decided to keep the firmware (for now).

The other is an Asus WL-500g Deluxe which have run OpenWrt for a long time. It became my secondary router when it turned out that it did not have enough flash space to hold OpenVPN also. LAN and WLAN works and apparently USB is also, but I have never tried that..

I was not planning on using the router part of the routers, so Remote LAN and Main LAN will not be distinct subnets. Practically, it mean that the WAN port of the router are unconnected and I use the default VLAN settings. They will have the same IP range, and being fed IP addresses from the DHCP server on the GW.

To WDS or not to WDS

When setting up an OpwnWrt router, you may set up multiple logical WLAN. A common combination for my case is to have both AP and WDS. AP enables clients to connect the wireless router and get connected to whatever network the router administrator has decided (usually the network on the LAN side).

WDS is about connecting routers. If one is connecting to the other as a client, you will not have merged the to subnets. One will be able to contact other without the opposite being possible. In my case, I want the two subnets to be merged, so devices on both nets can connect freely to devices on the other net.

Setting up the Asus WL-520g

We start with this box, because it is very limited in its options. I have located the manual on-line.

WL520g settings

  • Channel: 8
  • SSID: WdsTestNetwork
  • No encryption
  • Remote bridge list: WL500 router>
  • AP mode: WDS only
  • Rest is default.

The settings are the simplest possible. I want it to work, before tweaking other prarameters.

On a laptop, I set up wireless monitoring of channel 8 and I see that wl520g sends out STP information as the only kind of frame. Other wireless devices do not detect any networks, this is as expected since no beacon frames are sent.

Setting up the Asus WL-500g

There are guides and forum threads. The ones I looked at are an entry about WDS using broadcom and Kamikaze, solid documentation on a similar system and a thread of something working.

Kamikaze uses kernel 2.4 and the Broadcom driver is a proprietary driver. That means that the configuration options are not valid for Backfire, which still uses the proprietary driver but kernel 2.6. That is a big pitfall when looking through the documentation and forum threads. That is one of the reason this project has taken so long for me.

Going from 2.4 to 2.6, have apparently changed a lot, especially for router using proprietary Broadcom driver. OpenWrt has support for the open b43 driver in kernel 2.6. I have discussed that in detail elsewhere, but not in an OpenWrt context.

In the Josefsson entry, the system is described as working with Backfire. I will document my findings below. The important difference between my system and the system he describes eludes me. The thread of something working gave me hopes, so I tried that too.

Looking at the above description, it seems easy to set up WDS. There are numerous reports of people having big issues with WDS, and the general recommendation is to use identical routers in both ends.

Simple way – using Luci

First I flash the router with the latest Backfire image called openwrt-brcm-2.4-squashfs.trx. It was download from OpenWrt.org. I also chose to erase the configuration files, to ensure that I start from a clean slate.

There are options for setting up WDS in the Luci GUI. I point’n’click my way through the interface.

Monitoring the wireless traffic, I noticed that the wl500 replied to the STP frames, and it works. I have plugged a PC to wl520 and the rest of the network to wl500, and the PC has connection to the network and vice versa. Exchanging wl520 with wl500 works too. My Nagios monitoring tell me that both routers are up and running.

Kaplà

So while writing this blog entry, I fixed it. Apparently, as much as the reader may benefit from blog, the writer may as well. Cool.

I have now backed up the configurations.

Remaining tasks (for another day)

  • Figure out what went right
  • Enable AP on both
  • Check and post the OpenWrt config files
  • Physically move the devices to their proper locations (and check that they still work)

Written by moozing

December 13, 2010 at 09:00

Posted in Tech

Tagged with , ,

One Response

Subscribe to comments with RSS.

  1. […] have worked with WDS before, most wireless chips supports multiple WLANs and VPN is just about installing the right packages on […]


Leave a comment