Creating a wireless bridge using WDS

From Tom's notes
Jump to navigation Jump to search

or How to connect a Telenet Digicorder using Wi-Fi

Telenet Digicorders cannot be connected via Wi-Fi. Officially you either should use an utp cable to connect it to the Telenet modem (other switches in between are fine) or you have to use Powerline adapters. Telenet and their technicians will tell you connecting the modem using Wi-Fi doesn't work. I assumed that using two devices, one as an AP and another as a client could create a layer 2 bridge which would allow the Digicorder to be connected to the modem just as it would've been using the network cable.

Test 1: Sitecom wlx-2001

I got a Sitecom WLX-2001 to act as a wireless bridge/repeater and plugged everything in. Unfortunately, it didn't work. Tcpdump to the rescue revealed that the repeater was replacing the MAC address of the Digicorder with a virtual one. Looking further into it, it seems like this is the normal way these things work. As the Sitecom doesn't have much configuration options to change it's mode of operation, I decided to move on to another model.

Test 2: Linksys WRT54GL

Next attempt was made using a WRT54GL running Openwrt, configured in client mode bridged to the netwerk ports. Unfortunately, this had the same behaviour as the previous repeater and a virtual MAC was seen again. Just to make sure, I've tried cloning the MAC address of the Digicorder to the wireless card of the WRT54GL, but this also didn't work (it also doesn't make sense as the built-in switch would see the same MAC address on 2 interfaces).

Reading further into things, Broadcom chips have a WET mode that can be specified for wireless cards that should do what I need. WET (Wireless Ethernet Transceiver) does provide a nice transparent bridge, forwarding the MAC addresses of the devices to the AP. Unfortunately I failed to get it working using the WRT54GL and OpenWRT.

Test 3: WDS

As there was only limited configurability with the stock firmware on the AP, which was a Linksys WRT160N, I decided to flash both devices to dd-wrt for my next experiment. On both devices following settings were changed:

  • Disable WAN interface
  • Disable DHCP
  • Configured with fixed IP
  • AP mode enabled with identical SSID
  • Same password (WPA2 mixed mode)
  • Enable STP (Setup -> Networking tab in the bridge settings)

Then WDS (Wireless Distribution System) was configured. In the WDS tab, select LAN and enter the other AP's MAC address (as it's own MAC address is shown at the top, you can easily find it if you put the configuration page of each AP next to each other). After applying all settings, give the AP's some time to settle the STP. Finally, it was working: the Digicorders packets were nicely forwarded to the Telenet modem via Wi-Fi without any alteration.

For WDS, always use devices with the same chipset family. Don't mix between Broadcom, ralink, atheros or other chipsets as there's a good chance it won't work. There's a general WDS standard, but unfortunately implementations don't seem to be interoperable.

On new DD-WRT version WDS was not working

Some debugging shows that WDS was no longer automatically bridged to the rest of the interfaces. The easiest way to check is logging on to the router using telnet/ssh and comparing the interfaces of ifconfig with brctl show. The interface can be manually added to the bridge in the Setup -> Networking tab.

If adding it to the bridge via the gui doesn't work, add following line to the cron job:

* * * * * root /usr/sbin/brctl addif br0 wds0.1