Monday, January 07, 2013

Wake on LAN

Ever wished you could click a button and a computer in another room would boot itself up? Maybe you want to stream your iTunes media from a computer in the bedroom to the media center HTPC in the living room, but you didn't turn the bedroom computer on when you were last upstairs. Maybe you want computers to wake up in the middle of the night so they can get that 3am scheduled update... Maybe you manage a whole network of computers and there are a few that just don't get used often and you want to boot them up so you can check on them over the network. This is what Wake on LAN (WOL) is made to do. Any computer that is Advanced Configuration Power Interface (ACPI) compliant can be turned on remotely. You might have to go into the BIOS/UEFI firmware to set the WOL option to enabled, but it should be there. In the old days (around 1999) they used to sell PCI add-on network cards that had a Wake-on-LAN cable, a little twisted pair of wires that ran from the LAN card to the motherboard to send a wake-up signal. These days the wire is no longer needed (heck the card is no longer needed) WOL has become so common-place that it's just built-in.

Some home routers have WOL software built into them to wake the computers on your home network. Some corporate patch management software lets you WOL machines as needed.

Linux has a command line program called wakeonlan.
It is used  by typing:
wakeonlan [-i IP_address] [-p port] [hardware_address]

Windows has this too, called wolcmd (well, sort of, you have to download it from the 3rd party website www.depicus.com)
It is used by typing:
wolcmd [mac address] [ip address] [subnet mask] [port number]

Either of these can be put into a script to do more complex things like scheduling.

You can get WOL on your phone from Depicus too, and wake up your computers right from the palm of your hand. For iPhone/iPad/iPod Touch, Android and even Windows Phone! He also has a little GUI version, but because it doesn't remember details, it's less useful than the command line version, but it's not as scary to some users.


Personally, I wanted an easy way in windows to create groups of computers that wake up at a given scheduled time, so I've thrown together a little program over the holidays that I can use to wake PCs up on a schedule.
My program is called OgounWOL and you can download it here. (requires free registration to use)

OgounWOL comes in 2 parts. A little program that you can schedule to run once every 15 minutes, and a GUI manager (shown below) that you use to edit the program's database.

In OgounWOL you first create a list of all of your computers, then group the computers into groups that you want to wake up together, and then set up schedules to wake groups of computers up at a given time.
You don't need to keep this manager open, every 15 minutes the scheduled task will run a program silently in the background to look up if anyone needs waking and if so, send them the WOL Magic Packet to wake them up.

I have another version, that runs from a command line and takes a .csv file listing computers that you want to wake up. I call this one WOLCSV It is free and does not require registration. I wrote that one for use at work back in 2011.
Post a Comment