Nov 6, 2007

Can I Turn a Computer on Remotely?

Some times people ask me if there is a way to remotely power on a computer for one reason or another. Of course I tell them yes there is, and this feature is called Wake On LAN ("WOL"). Usually, these people aren't tech savvy so after I tell them that I get a blank stare or two. So let me tell you what WOL is.

According to Wikipedia:

"Wake on LAN (WOL, sometimes WoL) is an Ethernet computer networking standard that allows a shut-down computer to be booted remotely."


Sweet! Now we know what it is how do we do it? It is actually pretty easy. First you need a NIC (Network Interface Card) that supports WOL, and you need a motherboard with BIOS that support WOL. The good news is that most modern day NIC's and Motherboards support WOL, you just have to be sure that it is turned on in the BIOS. A lot of Motherboard manufacturers turn it off by default as a security feature.

Now that it is turned on, we need a program that will do it. WOL is not a built in command or program in Windows or Linux, you need a utility to do this. The good news is there are a plethora of tools out there. One for Linux is aptly named ETHERWAKE (sudo apt-get install etherwake wakeonlan for Ubuntu). There are some other configurations you need to make this work in Linux, which I will let you Google yourself. For this post I will mainly concentrate on Windows.

In Windows there are a bunch of tools, one I found that I like is called MC-WOL. The reason I like this one, and once again there are many like it, is because this lets you wake up computers that are on a different network. Some tools will only work on the same network you are on so be sure to look at all of the features and plan out exactly what you need. The good thing about MC-WOL is it works on both your local network, and across other networks.

So now we have our tool, the only thing we need it the MAC address of the computer we want to turn on, and if it is on a different subnet or network, we will also need the IP address of the target computer, or broadcast address for that network (If you use DHCP and the IP addresses changes). Can anybody tell me why we need both a MAC and an IP Adress if going across different networks? I will give you four guess and the first three don't count! The reason for this is WOL operates at layer 2 of the OSI model which requires MAC addresses, but in order to be routed to another network, we need logical addressing which operates at layer 3 of the OSI model. Anyhoo, enough about that.

So, to get the MAC address of our target computer you can simply run ipconfig /all, and write down the HEX number for your network card (Hint, it is called physical address). You will also get the IP address, and subnet mask of that computer using that as well (write it down). With the IP address and subnet mask, you should be able to identify the broadcast address pretty easily by using a subnet calculator. If the computer is set to static, all you need is the IP address.

Now with that information we are ready to test it out. Turn off that target computer, and run the following command from command line (Remember to change the information for your machine, e.g. your target MAC and IP):

MC-WOL 00:01:02:58:A3:C7 /a 172.16.1.125

To do this using the broadcast address for the network you would use:

MC-WOL 00:01:02:58:A3:C7 /a 172.16.1.255

If you did everything correctly, your computer should now be turning on!



Twitter Delicious Facebook Digg Stumbleupon Favorites More

 
Design by Free WordPress Themes | Bloggerized by Lasantha - Premium Blogger Themes | stopping spam