this blog is girtby.net

Posted
19 June 2005

Categories
Nerd Factor X

Tags

6 Comments

Can your router do this?

Linksys WRT54GSNew toy at Chez Girtby: A Linksys WRT54GS. Running the OpenWRT linux distribution. Can your router do this?

 BusyBox v1.00 (2005.05.25-20:30+0000) Built-in shell (ash)
 Enter 'help' for a list of built-in commands.

   _______                     ________        __
  |       |.-----.-----.-----.|  |  |  |.----.|  |_
  |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
  |_______||   __|_____|__|__||________||__|  |____|
           |__| W I R E L E S S   F R E E D O M

 root@OpenWrt:~# ps -ax
   PID  Uid     VmSize Stat Command
     1 root        408 S   init
     2 root            SW  [keventd]
     3 root            SWN [ksoftirqd_CPU0]
     4 root            SW  [kswapd]
     5 root            SW  [bdflush]
     6 root            SW  [kupdated]
     7 root            SW  [mtdblockd]
    23 root            SWN [jffs2_gcd_mtd4]
    36 root        392 S   syslogd -C 16
    43 root        352 S   klogd
   364 root        408 S   udhcpc -i vlan1 -b -p /tmp/dhcp-wan.pid
   454 nobody      408 S   /usr/sbin/dnsmasq
   459 root        428 S   /usr/sbin/dropbear
   464 root        408 S   /usr/sbin/httpd -p 80 -h /www -r WRT54G Router
   509 root        412 S   init
   510 root        648 R   /usr/sbin/dropbear
   511 root        460 S   -ash
   514 root        384 R   ps -ax
 root@OpenWrt:~#

There is so much to like here. The WRT54G is small and silent, perfect for 24x7 operation. It can happily coexist with visiting friends and relatives who don't always relish the soothing fan noise of the server farm. There's a nifty little 200MHz MIPS-based CPU with 32MB of RAM and 8MB of flash.

Also, OpenWRT is linux. But better than that it's stripped down to the bare useful minimum linux, as you can see from the ps output above. You install the extra stuff you want, as you need it, using an apt-get workalike called ipkg.

Installation was relatively painless, considering. The doco is a little intimidating, but contained most of the right information. The only slight hiccup was it didn't describe which of the two "experimental" firmware images to use (jffs2 or squashfs?) and I guessed wrong. Then it took me a while to realise that the "boot_wait" NVRAM setting which I had used to enable TFTP upload of the initial firmware on boot hadn't stuck, and needed to be turned on again before I could upload the right image. But all is well now.

I have learned to be pretty conservative when it comes to making changes to my router. So new toy is currently sitting behind my regular Netgear router (the one which is still corrupting broadcast packets and restarting its wireless interface every 4 mins exactly) in a crazy double-NAT arrangement. The idea is that I'll migrate my other hosts to the new Linksys box as it settles in (and I get used to it), and once all the hosts are sitting behind it, it will replace the Netgear as my internet router.

And do a whole lot more besides. I want to set it up to do traffic shaping, WDS, bandwidth usage monitoring, and lots of other über-geeky stuff. This is barely scratching the surface of what you can do with this great little box: check out the hardware pr0n!

Can you hack a VGA output into your router?

6 Comments

Posted by
Chris
2005-06-19 21:57:02 -0500
#

> in a crazy double-NAT arrangement

I resemble that statement.


Posted by
Peter
2005-06-19 21:57:02 -0500
#

Another interesting hackable device is the Linksys NSLU2. http://www.linksys.com/products/product.asp?grid=35&scid=43&prid=640

Again, a little, silent embedded box designed to samba share a USB drive. You can flash the firmware and do all sorts of interesting things with it. Check out:

http://www.nslu2-linux.org/

Why would you bother building specific embedded hardware when there are mass produced devices like the WRT54G and NSLU2 available off the shelf.


[...] y email that FreeBSD sends me. So there you have it. I guess I’ll migrate it to my new router at some point, but for now I’m happy. Th [...]


Posted by
BsAtHome
2005-06-19 21:57:02 -0500
#

> The only slight hiccup was it didn’t describe which of the two “experimental” > firmware images to use (jffs2 or squashfs?) and I guessed wrong.

Nice comment,... It would be more useful then to say which image is the correct one. Statistics will only confirm that your chance is 50%. No need to submit others to the same pain ;-)

-- BS


Posted by
alastair
2005-06-19 21:57:02 -0500
#

You are quite right, my apologies. The jffs2 squashfs image is the correct image for new installs.

EDIT: D'oh!


Posted by
Josh
2005-06-19 21:57:02 -0500
#

how did you make the boot_wait setting stick?