404 Tech Support

Wake-on-LAN @ Home

I briefly mentioned Wake-on-LAN (WoL) in a previous article, PC Power Management, and that’s when I started to think about it seriously and how it might be relevant to my setup. Right now, I leave my home computer on for long periods of time, even when I’m not there just in case I need to remote control it or if I want to stream my media. This wastes a bit of electricity each time just on the off-chance that I’ll need something from the computer. The problem is when it’s powered on, I have options but when it’s powered off, it’s inaccessible unless I can go physically turn it on. This is exactly where WoL comes in handy. If I were able to power on the machine when I needed it, I could shut it down with greater ease knowing that I wasn’t locking a lot of resources away with it.

First, I did some testing at work where we have a large network with plenty of machines and different configurations to try. This could definitely be handy there in the case where a computer is turned off, but I need it on in order to access its network share or send it some patches.

WoL works by using a very little amount of electricity to keep the network card powered on while the computer itself is turned off. While it’s true that if you’re not using the Wake-on-LAN features, this can increase your electricity demand while the computer is powered-off by a tiny amount, but if that’s the case you might be able to disable the WoL features in your motherboard BIOS or in the device configuration of your operating system.

While the network card is powered on, it is keeping an eye out for something called a magic packet. The magic packet is comprised of six bytes of all binary ones (1’s) or in hexadecimal 12 F’s followed by the MAC address of the computer you’re trying to wake up repeated sixteen times. The MAC address (aka Machine Address, hardware address, or physical address) is a unique key to identify every network device. A MAC address is composed of 12 hexadecimal characters and each network card has a different and unique one. The first 6 characters are to identify a specific hardware vendor like Intel or HP. The second 6 characters are to be unique to identify this particular device. If a WoL-enabled computer received a magic packet with its MAC address it will tell the computer to start up just as if you had hit the power button. You can see what the value of a magic packet looks like in an upcoming screenshot.

Magic packets are usually broadcast to an entire network, but only if the MAC address matches will a computer respond and boot up.

Two tools here might help you implement WoL in your environment:

Wake-on-LAN GUI provides an interface for the WoL commands. Simply enter the MAC address of the machine you want to wake up, the IP of a computer on that network, the subnet mask, whether it broadcasts to the Internet or the local network, and the port number. After that is entered, hit the Wake Me Up button to send a magic packet to that network where the specified machine should start booting up.

Wake-on-LAN Monitor, also from depicus.com, helps to troubleshoot WoL environments by showing you what the magic packet that is being broadcast to the address looks like. You can see Wake On Lan Monitor on the right side of this screenshot which also shows the value of a magic packet.

One thing to take into consideration if you do have to troubleshoot your process is that your hardware must support WoL. The variety of possible configurations is beyond what I could get into in a simple article. The network card and BIOS may have to be configured to enable W0L, as well as some older motherboards requiring a special cable to run from the network card to the motherboard in order to power it on. I had to purchase a new NIC card in order to get WoL capability for my computer as my integrated NIC did not support WoL.

One problem that I had to get around is that I wouldn’t truly be using Wake-on-LAN. I would be outside the little (local area) network provided by my Linksys router, in fact, I might want to be able to wake my computer from just about anywhere I could access the Internet. One of the options that the Wake-on-LAN GUI provided was a drop-down to choose between Local Subnet and Internet. Unfortunately, this didn’t work for my configuration, but nonetheless depicus.com provided another tool that did consistently work for me: Wake on LAN over Internet.

Simply browse to that site and enter the similar information as the GUI and hit the Wake on Wan button. This worked in order to wake up my computer where the GUI would not.

While the Wake-on-WAN site worked for me, it was far from ideal. I had to know all of the specific information in order to reach my machine and worst of all, I wasn’t able to forward the magic packets through my Linksys router. I’ve had similar problems with getting VPN to work with my Linksys router, but I was able to resolve those. The WoL problem remained despite my configuring it correctly to forward the magic packets. Fortunately, the open-source router firmware dd-wrt, is compatible with the WRT-160N v.1 that I have. I flashed the router to the open-source firmware in hopes of finding a better forwarding solution, instead I found a much better all-around package that complemented each other to make the Wake-on-LAN functionality complete and convenient. (If you get a blank apply.cgi page when you try to make changes in the dd-wrt interface, try using Internet Explorer or clearing the cache of your Firefox browser.)

The dd-wrt firmware has its own WoL functionality just by browsing to the router configuration page. Under the Administration tab, WOL sub-tab you can manually wake up a machine with the correct information or pre-configure a machine to be a simple one-click wake up. As you can see in the screenshot below, I configured the one-click wake up for my machine.

The ability to use Wake-on-LAN through the router administration site is a convenience;  it essentially allows me to use a one-click wake up from any machine on the network. To make the most use of this, I also enabled Remote Administration. This will allow me to reach the router administration site from the Internet. I would be able to reach that page by just typing my WAN IP address into a browser. This setting is under the Administration tab, Management sub-tab.

One final feature that dd-wrt let me use was its dynamic dns capabilities. I was able to enter my no-ip.com account information and it should keep a more memorable address pointed at my router configuration page even if the IP address changes.

Now, all I have to do is go to the no-ip location in a browser (404ts.no-ip.com), login, and switch to the Wake-on-LAN tab where I can give the one-click command to wake up the appropriate machine without having to worry about firewalls or forwarding the packets. I can now shutdown my computer, saving electricity and reducing my electric bill, while still having access to my files and computer by being able to boot it up with WoL across the Internet on demand.