Wake up on LAN on Windows XP, Windows 7 and Linux

To set up the wake on LAN feature, it requires a little bit of patience and testing.

If you're looking to wake up your Linux machine, see the link in the "sources" below.

The Windows 7 sleeper

*updated 23/07/14

This one caught me off-guard. I thought this tutorial would be enough but alas, it isn't.

  • Hit up Device Manager
  • Your network adapter > Properties
  • Power Management
  • Tick "Allow the computer to turn off this device to save power" (you have to, otherwise the other two will be disabled)
  • Tick "Allow this device to wake the computer"
  • And also tick "Only allow a magic packet to wake the computer" (otherwise your computer will wake up randomly)
  • Go to the "Advanced" tab
  • Enable "Shutdown Wake-On-Lan" and "Wake on Magic Packet"
  • Disable "Wake on pattern match"
  • Click "OK" to save your settings
  • Open up "Windows Firewall with Advanced Security"
  • Click on "Inbound rules"
  • Click on "New Rule" on the top right
  • Select Port > UDP > Specific local port = 9 > Allow the connection
  • Profile will depend on your network setup
  • And name it "Wake on Lan"

That should now be enough for you to skip to the "Network and computer settings" section.

image image

image

The Windows XP sleeper

Assuming that your machine is running Windows, you'll need to set some stuff on your network interface card (NIC).

Configure NIC

  • Open up the settings dialog for your network card
  • Click on "Advanced"
  • Scroll down to "Wake from shutdown"
  • Set it to "On"
  • Click the next one, "Wake-up Capabilities"
  • Set it to "Magic packet & Pattern match"
  • Go to "Power Management" tab
  • Make sure "Allow this device to bring the computer out of standby" is UNTICKED (I know it sounds weird, but you will get random startups after shutdown if it is ticked)
  • Click OK to save

image imageimage 

Network and computer settings

Mac Address

Open up command prompt

  • Type in "ipconfig /all"
  • Look for your NIC (it should resemble something like "Ethernet adapter Local Area Connection")
  • Write down the MAC address (labelled "Physical address")

Motherboard config

Now you'll need to set up your BIOS, so this will vary depending on your motherboard.

The following instructions are for the Asus P5K-E WiFi motherboard which I use. I take no responsibility if you mess up settings on your motherboard if it is not the same.

Enable Boot ROM

  • Advanced
  • Onboard Devices Configuration
  • Set "Marvell GigaBit LAN" to "Enabled"
  • Set "LAN Boot ROM" to "Enabled"
Configure Automated Power Management Settings
  • Power
  • APM Configuration
  • Set "Power On By PCI Devices" to "Enabled"
  • Set "Power On By PCIE Devices" to "Enabled"

Save and exit, then shutdown after the next boot completes. While you wait, begin setting up the next part.

*Issue 10/7/2011*

I can't seem to figure this one out, but my machine restarts itself after a shutdown about 80% of the time.

Usually it happens after I've had the machine on for a few hours and shutdown. It boots up again, but if I shutdown the second time it stays off. Very, very annoying.

If anyone knows how to fix this, let me know!

*Update 20/7/2011*

So I'm getting sick of the automatic restarts after shutdown due to wake on LAN.

Managed to find a long thread with plenty of potential fixes. The major offenders are:

  • "Magic packet and matching pattern" selected - change it to "Magic packet" only. This did the trick for me!
  • Mouse/keyboard or even another wireless card with power management options, which should have "Allow this device to bring the computer out of standby" unticked.
  • Other devices to check can be found by running the command prompt and typing "powercfg /DEVICEQUERY wake_armed" followed by "powercfg /DEVICEQUERY wake_programmable"
  • Scheduled tasks able to wake the computer up.

Someone had faulty hardware such as power supply units with bulging capacitors while another had a faulty graphics card which triggered the reboots.

A fairly odd one was that a fridge was jumpstarting the PC due to dodgy electrical circuits in the house.

The Linux "alarm clock" machine

I'm using my "always on" Linux box to wake up the Windows machine.

Install wakeonlan using "sudo apt-get install wakeonlan"

Now when you're ready to wake up the windows machine, type in "wakeonlan -i 192.168.1.255 mac_address"

The "192.168.1" bit will depend on your network. Just keep the 255 bit because that is to broadcast the MAC address to the whole subnet.

punishingbouquetp1
BAM! Wake up!

*Updates 29/6/2011*

  • Disable allow device to power up computer
  • Broadcast IP

Testing your setup

*added 23/7/2014

I wish I knew this earlier, but it's always nice to be able to test your config. It saves you a LOT of time rebooting!

Download the "Wake-on-LAN packet sniffer v1.1 (freeware)" and run it. Attempt to send a test packet from your phone using an app (I used "Wake on Lan" by mafro for Android). If nothing comes through, check your firewall or network settings.

image

Sources

 
Copyright © Twig's Tech Tips
Theme by BloggerThemes & TopWPThemes Sponsored by iBlogtoBlog