« Attacks on Public Internet Nodes | Main | Netgear WGPS606, Follow-Up »

Wake-On-Lamb (WOL)

Last Sunday, I installed the OpenWRT firmware on our Linksys WRT54GS Access Point. It's pretty sweet, especially since there is a large assortment of software available to run on this little consumer device. Because the Access Point is on 24x7, I figured it might be useful to have it turn on our other computers using the Wake-On-LAN (WOL) feature present in most Ethernet cards these days. The system I had in mind was the Linux box stuffed in the closet. I typically press the pow-pow button every morning, except for those mornings on which I forget and have to ask Natalie. Per usual, I decided to spent 4 hours automating a task that takes 5 seconds.

The Linux box includes the Asus P4C800 Deluxe motherboard, which has a built-in 10/100/1000 Ethernet adapter. Since the Ethernet adapter already works well in Linux, I figured it would just be a matter of configuring the card to generate a Power Event when it encountered the appropriate WOL Magic Packet (yes, that's the correct term). I issued the following command as 'root' to configure the Ethernet adapter:

    ethtool -s eth0 wol g

I was able to confirm my changes by again invoking 'ethtool':

    ethtool eth0

I then learned that WOL settings are only active for one boot-cycle. So, after configring the adapter using ethtool and powering-down, the computer should respond to WOL and boot but then need to be reconfigured using ethtool. This wasn't a huge hurdle since I could easily create a script in the /etc/init.d directory to automate the ethtool command during boot-up.

But WOL didn't work. It simply did not work. I googled the problem a bit and learned that the Ethernet NIC in my motherboard is not well-supported by the stock Linux driver. I even went so far as compiling a custom kernel with the vendor driver, but had no luck. It looked like WOL was a wash.

So, I went with the old-school solution of configuring the BIOS to generate a Power Event at a pre-determined time every day to start the system, and a CRON job in Linux to shut-down the system at the end of the day. Total time spent on that solution: 15 minutes. The joy experienced in fooling with NIC, kernels, and Linux: priceless.