LinkSys WRT54G and OpenWRT
Ben Scott
dragonhawk at gmail.com
Sun Mar 11 16:19:07 EDT 2007
Hi everybody!
I was asked off-list about my experience with OpenWRT. I asked if
an on-list message was okay, and it was. So:
I have a LinkSys WRT54G, Hardware Version 2, at home. As many know,
these boxes run Linux internally, and third-party firmware has been
developed to greatly extend their feature set. Llyod Kvam recently
spoke at the Nashua chapter [1] about doing this for his own purposes,
and that's what gave me the impetus to finally try it out.
Picking a Project
-----------------
There are several different third-party firmware projects. OpenWRT,
DD-WRT, HyperWRT, Sveasoft, and others. I did a little Googling,
trying to figure out which was best for my purposes. I eventually got
the impression that OpenWRT was well-supported and very "modular" --
it's built around the idea of a small base system plus optional
packages, just like a "regular" Linux distribution. So I went that
way.
Installation
------------
Installation was ludicrously simple. I went to the OpenWRT home
page (http://openwrt.org/), clicked "Download", downloaded the release
for my box, and uploaded it using the LinkSys stock web UI. The box
rebooted, and was now running the OpenWRT firmware. It even preserved
my old configuration!
Well, okay, I read some documentation first, because that's the kind
of guy I am. But that was the conclusion I reached. The only
tricky part was picking which firmware was what.
Picking the Firmware
--------------------
Short version: Go to the OpenWRT home page, click "Download", click
"Default", find the file name that matches your model name, and grab
that.
Long version:
There are multiple base images, with different functionality
included. This is apparently done mainly for the newer LinkSys boxes
(V5 and later), which don't have enough marbles for a complete kit.
If you've got a V4 or or older WRT54G, or a WRT54GL, you can just use
the "default" (I guess sometimes called "bin") base image.
There are two firmware file formats, TRX and BIN. These days, I
gather you can just use the BIN provided for your model. (I guess it
used to matter more, but things have improved, and now it doesn't.)
There was also mention of JFFS vs SquashFS images. I gather this is
also obsolete these days. At the least, the pre-built images are all
just "squashfs".
There's also all this stuff about version numbers and mixed drinks.
Just use "whiterussion/0.9", which is the current stable release.
(The mixed drinks are tags for the release milestones.)
Configuration
-------------
There is no stock password. To set the password, you telnet to the
box. It automatically logs you in to a root shell prompt. You then
run "passwd" like you normally would. In addition to setting the
password, this also disables Telnet and enables SSH. The default
firewall *does* block everything coming in from the WAN/Internet side,
so you at least need to be on the LAN in order to do this.
As I mentioned above, OpenWRT preserved the configuration I had
created with the stock LinkSys firmware. Apparently, OpenWRT
understands and uses the same NVRAM syntax as LinkSys. So
configuration was already largely "done".
More Installation
-----------------
The OpenWRT web interface ("webif") had some, but not all, of the
basic configuration elements of the LinkSys web UI. But I quickly
found reference to something called X-WRT and Webif² (Webif^2). X-WRT
is an overlay distribution (think atrpms, rpmforge, etc.) for OpenWRT.
Webif² is a *much* more powerful web UI. To install it, you just
issue this command at the OpenWRT root prompt:
ipkg install http://ftp.berlios.de/pub/xwrt/webif_latest_stable.ipk
One auto-reboot later (they did warn of this), and I was presented
with the new-and-improved Webif² UI.
The web UI does provide a menu-driven list of available packages,
with options to install them, so even keyboard-phobics may be okay.
More Configuration
------------------
The Webif² UI looks pretty capable, while still being accessible to
newbies (and I'm still a newbie to OpenWRT). There are many options,
but they are divided into categories and subcategories that made
immediate sense to me. There are links for "More information" all
over the place. When a function needs some optional packages to make
it work, there were widgets right there in the UI to click to install
them. I installed and configured NTP easily in this way.
Conclusion
----------
That's about as far as I've gotten so far. There's a lot for me to
learn, but the docs on the OpenWRT site seem to have lots of info to
at least get me started.
All in all, given that this involved replacing the entire OS of an
embedded device with third-party software designed by and for Linux
geeks, this was about as easy and accessible a project as I can
imagine. No configuring a kernel, no opening the case and installing
extra connectors, no cross-compiling. It was point-and-click.
Footnotes
---------
[1] http://mail.gnhlug.org/pipermail/gnhlug-announce/2007-February/000383.html
http://permalink.gmane.org/gmane.org.user-groups.linux.gnhlug/8833
More information about the gnhlug-discuss
mailing list