Linux Wi-Fi: Supercharge a Buffalo

Best of ENP: The DD-WRT wireless router project brings the flexibility and power of Linux to inexpensive gear.

The popular DD-WRT project was initially an offshoot of the original Linksys firmware for the WRT54, but has since undergone a complete rewrite, and now uses the OpenWRT kernel. DD-WRT is a fine upgrade for your WRT54 wireless router, or any similar device under other brand names, and there are a lot of them. The current bargain is the Buffalo WHR-G54S, which can be found for under $40. This is a popular upgrade, because it turns your buggy, inflexible, inexpensive wireless router into a rock-solid routin' powerhouse, with all manner of useful services: name services, firewalling, port forwarding, RADIUS authentication, Ethernet bridging, IPv6 support, QoS, SMB/CIFS automount, and Internet access controls.

The Buffalo WHR-G54S has limited storage; only 4 megabytes of NVRAM, and 16 megabytes of system RAM. So it doesn't have room for all of the available DD-WRT options. But you get an amazing amount of functionality into this little box, and for the price it's a steal. It will serve as an Internet router and firewall for 30 or so users, provided they're not online gambling nuts or Bittorrent addicts. You could also use it as LAN router, a LAN bridge, a dedicated wireless access point, part of a wireless mesh network, or a VPN gateway.

Installation

Let's take a walk through installing the DD-WRT firmware on the Buffalo WHR-G54S, because there are some tricky bits. These directions also apply to the Buffalo WHR-HP-G54, WZR-HP-G54, and WZR-RS-G54. With a lot of these little routers you can upload new firmware using their factory Web interfaces. But the Buffalo boxes, which are based on Broadcom hardware, accept only special encrypted firmware over the Web interface. So we have to sneak DD-WRT in through the back door, which is a short interval at bootup where the Broadcom flash ROM enters a special mode that allows new firmware to be uploaded via tftp transfer.

Prerequisites

Make sure you have the tftp command installed

If any device or computer on your network has the IP address of 192.168.1.1, take it off the network or change the address, because that is the default IP address in the DD-WRT firmware

Make sure you have the route and ip commands available; these come with the net-tools and iproute packages

Your Buffalo router will plug into your LAN switch just like any other device. For now you want to stick with old-fashioned wired Ethernet; don't try to do this over a wireless connection. Go ahead and power it up, and point a Web browser at http://192.168.11.1. (For the WZR-RS-G54 it's 192.168.12.1.) The default login is root, with no password.

If this doesn't fit your LAN addressing, there is an easy way to get there. Use the ip command to add an address to the network interface of your PC, then add a host route:

You can also run a ping test from the router; just click the System Info button to find the ping page.

All righty then, you know it works. Unplug the router's power cord, and go to the Downloads page at DD-WRT.com and download the dd-wrt.v23_mini_generic.bin file, or whatever the latest version is. Make sure it's mini_generic.bin. Change to the directory that contains the new firmware. Then run these commands:

Hold the Buffalo router so you can see the green Ethernet port LEDS, which are on the back next to the ports. When it's first plugged in, all of them light up. When they all turn off except for your one connected port, hit 'enter' to execute your last tftp command. If it works, you'll see a lot of