Wake-on-LAN

2009-06-12

Having installed my Alix board successfully as the Ethernet router (yeah, still working on the Wifi aspect), and wanting to save some energy and lower the noise threshold in my room, I decided to implement WoL.

Windows XP can be awakened via WoL magic packets, or any packets. It’s like the difference between a heavy sleeper who needs not only an alarm clock but also a knock on the door to wake up, and a light sleeper who will wake up upon hearing footsteps. The heavy sleeper (using magic packets) is what I want because it will stay asleep until I tell it explicitly to wake up. I’ll be putting the computer into standby when I’m not here, dropping my concurrent wattage from 125W to 5W. It may only be a monthly savings of about 5 bucks, but every bit helps.

Using Voyage Linux on the Alix, etherwake can be installed easily using:

apt-get install etherwake

It seems important to specify which interface to send the magic packet, so naturally I created a shell script at /usr/local/sbin/awaken. It looks something like this:

#!/bin/bash
etherwake -i eth1 machine

Now when I need to log into my system at home remotely I can now fire it up from elsewhere.