Distance Debugging Logo

I have two WRT54g routers (well, one 54g v4.0 and one 54gl since they messed with the 54g line after that version), both "upgraded" with the OpenWRT firmware. One of the things that I use them for is to bridge them together over WDS so that I can have a bunch of computers talking to each other over a wired link upstairs in my office, and then have that router bounce traffic destined for outside or other computers downstairs over the WDS link. I had it seemingly set up okay, but I started to notice some weird effects, which I've since learned had to do with my failed understanding of what was actually happening.

  • All wireless clients would only connect to the downstairs AP. I figured they would talk to whomever is closer, and this defeated the secondary purpose of this set up, which was to provide better coverage for wireless clients. Since the WRT54g has a much better set of antennas, it seemed like it would be a win for clients upstairs, not to mention that they would "think" they were connected more often, which is just as good.
  • Occasionally I would have weird wireless dropouts. I figured that this would no longer happen since there were multiple access points. Instead I expected to see the wireless signal staying strong, but the packets being dropped. That's how I discovered the above.
  • I would get duplicate packets when I pinged things from a wireless client. I attributed this to just an odd side-effect of my setup, and it didn't seem to affect anything major.

Well, it turns out that what I was doing was a little bit screwy, and I'm still not even quite sure why it worked. First of all, I set it up in client-bridged mode, so the upstairs router was not acting as an Access Point. In my mental model of the situation, I assumed that being an access point and being a bridged client were incompatible and that the latter subsumed the former. Even weirder, I was using the wrong mac addresses for the WDS connection, so I think I was actually entering the network at the wrong level and I think that was what was causing the duplicate packets, although I'm surprised WDS worked at all.

My real problem is that I failed to understand that using WDS and being a client are orthogonal properties. You can turn on WDS in all your routers, and still let them all be access points, or let them be clients. As access points, they all accept wireless clients, and route traffic to each other accordingly, which is what I wanted. When I switched the upstairs box to be an access point, it suddenly stopped routing packets to the downstairs box, and that's where I got the idea that they were linked together. Somehow, when I set the box up as a client/repeater, it worked, even with bad MAC addresses. Once I fixed the mac addresses to correctly use the wireless devices, it worked as expected, in access point mode.

Now if I scan for access points, I see the one with the stronger signal, and my wired boxes upstairs can all get out through the WDS connection. For anyone who has played around with this, make sure you use the MAC addresses that you see when you say 'iwconfig eth1' on your routers, and not the one that shows up on the status page. That was my main mistake. This was also a great example of how you can fit observed symptoms to an assumption of functionality that proves to be totally wrong.