There's nothing quite like solving your own problems with Linux. Using Linux-based DD-WRT solved a big one for me.
When looking for a solution to any problem, you should always follow your instincts. Linux is what I do and it rarely fails me. Linux, once again, has saved me hundreds of dollars and several headaches by being versatile, free, and powerful. This week, you’ll learn how I turned a giant lemon into a bucket of lemonade using the DD-WRT project, a never-used Linksys (Cisco) wireless router, and my Internet service provider’s router. I created an extended network for my home computer setup. By bridging the two routers, I effectively created a Home Area Network so that I could have a data center in my garage.
For months I’ve needed to create a data center in the garage to free up space in my house and to expand my IT research efforts. Unfortunately, the only practical way to do that is to use a wireless access point in the garage. Why is that solution unfortunate? Because I have a 2Wire 3800HGV-B wireless router supplied by AT&T Uverse and it has limited compatibility with other wireless devices. Googling for the answer yields dozens of “Run a wire from the 3800HGV-B to the other router.” According to the ‘powers that be*,’ that isn’t going to happen. So, I finally came up with a working solution using Linux, of course.
This demontration uses a Linksys WRT160NL Wireless-N broadband router to connect to a 2Wire 3800HGV-B wireless router. The 2Wire router is the primary router in the setup. You should be able to reproduce the setup with any two compatible routers. Be careful when changing settings on your primary router. Most changes in this article are performed on the remote router (WRT160NL).
The 2Wire router wants to be the primary router on the network and must be the only DHCP server. There seems to be no way to turn off DHCP on this router because each DVR must have its own IP address and they’re assigned dynamically. For the reason I’ve already stated, a wired connection is not an option. There are wireless access points that are compatible with the 2Wire router but they are only access points and have no router or Ethernet connectivity available.
The problem is that I need full network connectivity in the data center and wireless access alone won’t work. I tried this exact setup several months ago with the same equipment but no success. However, there have been new releases of DD-WRT firmware and fixes to features that weren’t well supported.
The first part of this journey requires a firmware update to the WRT160NL (160NL) router. To do this, connect a computer to the 160NL using a standard, not a crossover, Ethernet cable into one of the available switch ports. Set a static IP address on the LAN network interface that matches the router (Probably 192.168.1.xxx/255.255.255.0). Download the latest firmware (v24 pre-SP2, as of this writing) to the connected computer and remember its location.
Disable wireless connectivity on the computer, if available. Disabling wireless access on the 160NL-connected computer will guarantee that you’re using the 160NL for connectivity and not the 2Wire’s wireless connection. The 160NL should be in the same room with the 2Wire for easy referral during the process. The close proximity also ensures strong connectivity between the two devices.
Open a web browser and navigate to the 160NL’s management page. The address is http://192.168.1.1 and the password is admin with no username. Click on the Administration tab of the administrative interface and select firmware update. Browse to the downloaded .bin file, select it, and update the firmware. When the firmware update finishes, power down the router, power it on again and wait for the router to initialize.
When the router has fully booted, open a web browser and point it to http://192.168.1.1, enter admin for the password, set a username and change the default password, and apply the settings. Power cycle the router. Login to the router with your new username and password.
Configure the Client Router
The 160NL is the client router and the 2Wire is the self-appointed host router in this scenario. To configure the 160NL to act as a client router, select the Wireless tab, change the Wireless Mode to Client Bridge, set Wireless Network Mode to Mixed or the same setting as your primary router, set Channel Width to the same setting as your primary router, change your SSID to match your primary router, and apply your settings. See Figure 1 for example settings.
Figure 1: Basic Wireless Settings for the WRT160NL
Now select the Wireless Security tab. This is one of the most important steps, so don’t skip it or forget it. Change the Security Mode on both routers to WPA2 (WPA2 Personal or WPA2-PSK (AES)). The default on the 2Wire is WPA-PSK (TKIP). Select the AES WPA Algorithm and enter your WPA Shared Key. This key (if you haven’t changed it), is written on the side or bottom of the device. Enter a 0 in the Key Renewal Interval to disable key renewal. If you don’t disable this feature, your 160NL will disconnect at the specified interval and you’ll have to spend time restarting it. Refer to Figure 2 for settings.
Figure 2: Wireless Security Settings for the WRT160NL
Note: Make sure that your primary router and secondary router have different IP addresses. In my case, the primary router IP address is 192.168.1.254 and the client router defaulted to 192.168.1.1.
Select the Basic tab, set the Gateway address to the primary router’s IP address, select your Time Zone, change the Daylight Savings Time (DST) to the correct value, and apply the settings. See Figure 3.
Figure 3: Basic WRT160NL Wireless Setup Options
Select the Security tab, select the Firewall tab, uncheck and disable every option except Filter Multicast, and apply settings. Finally, select the Setup tab, change the Operating Mode to Router, and apply settings. Figure 4 shows the complete setup.
Figure 4: Diagram of the New Wireless Network Configuration
Test Your Setup
Reset the LAN interface on the 160NL-connected computer to DHCP and test your connectivity to the Internet and to the rest of the LAN.
$ nslookup yahoo.com
A positive response (shown above) is what you’re looking for in this test. If you receive no response, then go back and check all of your parameters. Sometimes the router won’t correctly save the changes you’ve made. If you still can’t connect to the Internet but you can connect to local network systems, check your IP configuration on your system.
eth0 Link encap:Ethernet HWaddr 00:19:21:ea:ad:8e
inet addr:192.168.1.79 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fe80::219:21ff:feea:ad8e/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1316196 errors:0 dropped:0 overruns:0 frame:0
TX packets:405177 errors:0 dropped:0 overruns:0 carrier:0
RX bytes:106497477 (106.4 MB) TX bytes:62275560 (62.2 MB)
If everything looks good, your next option is to change the DNS IP address on the 160NL. First, try the IP address of your primary router. If connectivity still fails, try using the DNS address that matches the one shown in your primary router.
You should position your routers for maximum connectivity. If your connection quality is below 50%, you might lose connections to your remote systems. Place the remote router in a high location that’s free from clutter. Adjust the remote router antennae for maximum connectivity as well.
Wireless connectivity can be a tricky beast. It requires patience, trial and error troubleshooting, good hardware, and perhaps a bit of luck. Remember to keep Linux in your toolbox as you plow through your technical explorations. And, may the Tux be with you, always.
* My wife.