Extending Wi-Fi networks without halving your bandwidth.
Living in a rented apartment in one of the most densely populated cities in Europe sometimes has its challenges. If you’re a techie, you will likely find one of those challenges to be getting your Wi-Fi to work effectively and at any sort of range given the huge numbers of networks you will find around you. If I fire up the very wonderful inSSIDer in my living room, I can see no less than 33 networks (one of which is using WEP – eek!).
When I look at the channel graph (which sadly doesn’t have an option to hide SSIDs so I won’t be posting a screenshot), I see an almighty mess. This issue is compounded by the layout of my apartment. I know there are other ways to make an apartment unfriendly to Wi-Fi but I find ~22 meters of length with multiple brick walls does a fine job of blocking high-frequency radio signals. Between the lack of clear air and structural obstacles, getting decent connectivity across the apartment has been a serious chore.
I am clearly not the only person with this kind of problem. There are a set of technologies out there that are sold claiming to help one solve these issues. There are many dedicated and often not particularly effective Wi-Fi repeaters on the market. The Powerline networking space exists specifically for this use-case but seems to be effective only for a proportion of those who buy them (some people have more serious concerns about them). In general, the dedicated solutions work, but just not all that well. Practically speaking, I want to be able to shift 50Mbps consistently from front to back without adding a tonne of latency and without spending too much money.
In an ideal world, I would just run CAT5 through the walls and if I were building / rewiring a house, there is no doubt I would do it. As a tenant though, that is just not going to happen. The most cost effective solution for me is to use general purpose Wi-Fi routers to repeat and thereby extend the Wi-Fi signal through my apartment.
The industry standard solution to support this is the Wireless Distribution System (WDS). This has the advantage of relative simplicity and built-in support in many routers. WDS has two major drawbacks in that it halves your effective network bandwidth and only supports the thoroughly broken WEP and WPA encryption standards. WPA2 isn’t perfect but it’s the best we have right now and I would rather use it on my networks.
DD-WRT to the rescue
DD-WRT is an alternative, Linux-based firmware for Broadcom and Atheros based Wi-Fi Routers. It has been around for many years and is considered sufficiently stable for some router manufacturers such as Buffalo to offer it by default on their devices. One of its great strengths is that it provides a number of ways to bridge and route multiple Wi-Fi and wired networks together. These include the ubiquitous WDS but much greater flexibility is allowed by the provision of Repeater, Repeater-bridge, Client and Client-bridge modes. Until recently, I was successfully using the ‘repeater’ mode of DD-WRT to extend the 2.4GHz N (300Mbps) signal from my cable router through the rest of my house via a classic Linksys WRT54G. This is a workhorse router that has been around forever and is sufficiently famous that is has its own Wikipedia entry.
Using ‘repeater’, the 300Mbps signal from the living room was repeated as a 54Mbps signal through the rest of the house. I was able to get reasonable (internet) bandwidth to the back of the house and was able to download at a bit more than 1MBps on a good day. I also got reasonably low levels of latency and was able to use WPA2 throughout. Repeater mode does share one issue with WDS. It halves the effective bandwidth available. When that bandwidth is only a (theoretical) 54Mbps in the first place, you are not going to see world beating figures.
Having recently spent a day trying to do a bulk-transfer of data from front to back without much success, I was inspired to find a better solution. Some digging around the DD-WRT forums turned up a comment from Barryware noting that,
[…] the 4200 has two radios. you can set on up to receive (client or client bridge), and the other to be an AP. You will not lose 1/2 the wireless bandwidth if you choose to do it that way.
The E4200 is a dual-band, dual-radio router from Cisco/Linksys with a reputation for being delivering good range out of the box. It is also supported by DD-WRT albeit with some caveats. While on vacation a few weeks ago, I took the opportunity to pick up an E4200 and rebuild my home network as shown in the diagram below.
The difference is huge. I can now reliably download at over 40Mbps from the Internet at the back of the house. The setup was also remarkably simple.
The 5GHz band is a ghost town
The E4200 is both dual-band and dual-radio. That means it has separate antenna for the two consumer Wi-Fi bands. When I bought the router I had not read a lot about Wi-Fi in general. I had a good conceptual understanding of the basics and security in particular but didn’t know how much things changed with the introduction of the N standards. The introduction of the 5GHz band changes things dramatically. While not strictly a feature, I found out how dramatically 5GHz changes things, the first time I fired up inSSIDer on a 5GHz capable machine.
In contrast to the 33 2.4GHz networks I can see from my front room, before I installed my E4200, there were a grand total of… none, on the 5GHz band. In effect, I have the 5GHz band entirely to myself. While there are great benefits to using the twin radios to avoid bandwidth losses, the clear-air in the 5GHz band has probably been just as important, I suspect.
Setting up dual-radio extension
I am not going to provide instructions for getting DD-WRT onto a router. The DD-WRT wiki and forums have ample information and I would suggest starting there. I am not even going to link to specific documents as they are easy to find but do occasionally change location. As such, make sure you’re reading the latest as getting the process wrong can lead to tears. Seriously, there are lots of ways to make yourself very sad so on this occasion, RTM!
Once you have DD-WRT on your repeater device (the E4200 is a fine choice but do be careful about hardware versions – check the DD-WRT router database for compatibility to avoid disappointment), you can proceed to configure your bridging. For my network, I want a single, flat subnet for everything inside my house apart from the cable router itself which I treat as tainted goods since it was supplied by the cable company.
The basic principle is to use one of the E4200 radios to connect back to the Buffalo WZR-HP-G300NH in the living-room. I won’t provide instructions for setting up the first router. The important thing is to ensure that you note all of the wireless settings you choose to use (including standard, channel and width). The basic process is as follows but even though it is a simple process, you should through and use the more detailed documentation for ‘Client-Bridge’ at the DD-WRT wiki to complete your setup.
- Do a full 30-30-30 reset of the router to clear out all existing configuration
- When the router restarts, set a non-default username and apply a decent password
- Login and go to the wireless tab.
- Set the 2.4GHz network to “Client-Bridge” mode and set the other parameters exactly as you configured the first router
- Go to the ‘wireless-wireless security’ tab and set the security the same was as for the first router (note that you must use AES encryption since TKIP apparently causes issues)
- Go to the ‘basic-settings’ tab and set the router management IP to what you want it to be
- Go back to the wireless tab and setup the second radio however you want it. This is now your ‘extension AP’.
Client bridge mode is described in the wiki as follows:
Join two wired networks by two Wireless routers building a bridge. All computers can see one another in Windows Network.
What we are doing is extending the definition such that instead of joining two wired networks, we are joining one wired network to another (5GHz) wireless network by means of a (2.4GHz) wireless bridge.
The results for me have been fantastic. I get a strong 2.4GHz signal at the front of the house (albeit of variable quality depending on what the neighbours are doing) and I get an extremely consistent signal at the back of the house on the 5GHz. It is nice to know that I have that band to myself as well.
If you live in a densely populated area, look at going 5GHz. The 5GHz band has a lot more elbow room to begin with (see my earlier post on channel layout) but because very few people are using it at the moment, there is a window of time during which one can enjoy wide open electromagnetic vistas, free of the hoi polloi. If I had endless money, I would look to replace my two existing routers with a couple of routers, both with dual 5GHz radios. I can’t seem to find such a beast but it would let me run one 40MHz channel pair at the front of the house and a difference channel pair at the back. I am happy with the setup I have though. I would like greater consistency but for now, that’s the price you pay for having neighbours!