A lot of Linux geeks are master scroungers, because Linux is so adaptable that old AMDs, classic Pentiums and even 386es and 486es can be put to use in some way. It’s a shame to throw away old equipment when it can be repurposed as networking devices like firewalls, authentication servers and routers. But as fun as it is to recycle, I’ll wager I’m not the only who has gazed upon shiny new devices like the Linksys WRT54G and sighed “Wouldn’t that be a great device for my network! It is small, cheap, and uses little power. But it lacks functionality, and I cannot tweak it to suit me.” Well, now you can tweak it to your heart’s content, thanks to the OpenWRT project.
Installing OpenWRT will void your Linksys warranty. Also, installing the OpenWRT firmware has its tricky parts, and there is the possibility that your box will be rendered useless. You have been warned.
Back to the Fun Stuff
Those little blue boxes can function as wireless access points with actual meaningful security; Ethernet bridges, switches, routers, repeaters; DNS, DHCP, NTP, and http servers; VLAN switches; printer servers; intrusion detectors; firewalls; and lots more. It will do whatever you have the ingenuity to make it do. You can even remove the cover and find the secret serial ports, add a VGA connector, cobble up a USB connector, add an LCD display, power button, add a compact flash card for a big fat one-gigabyte of storage, and loads more hardware hacks.
OpenWRT got its start when it was discovered that the much-acclaimed Linksys WRT54G/GS ran on GPL (define) code, but did not distribute source code as is required. The Free Software Foundation got involved and this sad state of affairs was rectified. (Sort of, see the LWN.net article in Resources. Nothing is ever simple.)
The OpenWRT developers studied the Linksys code and decided that a fresh approach was preferable, rather than trying to modify the existing code. OpenWRT uses a writable filesystem, and is designed to be extensible and customizable. So your nice little blue box is transformed from a statically-configured, inflexible special-purpose device, to a miniature Linux PC that can be customized nearly any way you want. In part 1 of this two-part series we’ll install OpenWRT. Part 2 will cover configuring it for a number of typical networking scenarios, such as wireless bridging, activating WAP (define) , running a DHCP (define) server, and doing cool stuff that is usually found only on more expensive switches, like setting up VLANs (define).
OpenWRT runs on a number of similar boxes, not just the Linksys, because they are all powered by the same Broadcom chipsets. Other supported brands are ASUS, Buffalo, Motorola, Ravotek, Siemens, and US Robotics. Visit the Table of Hardware to find model numbers. In this series we’ll stick with the Linksys WRT54G. Visit the OpenWRT documentation pages to find instructions for other devices.
Some vendors of networking hardware seem to take a perverse pride in providing bales of useless data, like operating temperature and humidity range, storage temperature and dimensions in both standard and metric. But just try finding actual hardware specs, like the CPU, radio chipsets and amounts of flash memory and RAM. You’ll either have to pester the vendor, or rely on third-party sites like Linksysinfo.org. You might even want to know the version number, which is a Big Secret which is not revealed until you open the box. Or, until you decode the Sekkrit Serial Number on the outside of the box. According to this page on DD-WRT, which is a similar project to OpenWRT, this is how to determine the version number without having to purchase the dern thing first:
The first 4 digits in the serial number (look on the box or the underside of the router) represent the hardware revision:
CDF0 = WRT54G v1.0
CDF1 = WRT54G v1.0
CDF2 = WRT54G v1.1
CDF3 = WRT54G v1.1
CDF5 = WRT54G v2.0
CDF7 = WRT54G v2.2
CDF8 = WRT54G v3.0
CDF9 = WRT54G v3.1
CDFA = WRT54G v4.0
CDFB = WRT54G v5.0
CGN0 = WRT54GS v1.0
CGN1 = WRT54GS v1.0
CGN2 = WRT54GS v1.1
CGN3 = WRT54GS v2.0
CGN4 = WRT54GS v2.1
CGN5 = WRT54GS v3.0
CGN6 = WRT54GS v4.0
I heard a rumor that the WRT54G Version 5.0 has half the memory of its predecessors, which contain 4 megabytes of flash memory and 16 megabytes RAM. However this is still unverified; at any rate us dumb ole customers really don’t need to be protected from scary technical data and version numbers, though that does expose us to the risk of making informed decisions. The WRT54GS has twice the memory of the WRT54G (8/32), so if you need a lot that’s the one to get.
Installing OpenWRT the Easy Way
You can do everything from any old Linux PC that is on the same subnet as the Linksys box. You can even install OpenWRT from a Windows PC with PuTTY; see the OpenWRT documentation. There is an easy way, and a hard way. The hard way is more reliable, of course; the easy way could possibly lock you out of your own router if it fails, which means you are left with a pretty blue paperweight.
The easy way is to find the OpenWRT binary that goes with your particular router model and version. The WRT54G uses the same firmware for all versions. The current version is RC3, openwrt-wrt54g-squashfs.bin. Use the squashfs binary, rather than the jffs2 binary, as it is considered the standard install. The squashfs binary has a read-only squashfs partition and a writable jffs2 partition. This means you can make configuration mistakes (after installation) and still be able to access the router. The jffs2 binaries are completely writable, for those who want complete customizability.
To install the new firmware, use the Linksys Web administration interface: Administration -> Firmware Upgrade. If it works, you can reboot the router into OpenWRT and move on to configuration. If not, well, oops. But you were warned.
The hard way will have to wait until Part 2. Or visit the OpenWRT documentation pages and forge boldly ahead without us.
- Be sure to visit the the OpenWRT home page for the latest news, releases, and important information.
- If you lost your Linksys manual, visit Linksys.com.
- Linksys and the GPL – again; a good article on Linksys’ violation of the GPL and how it was settled with a minimum of lawyer power.
- Seattle Wireless, a great resource for wireless users