How to Set up and Use Wake-on-LAN

What is Wake-on-LAN and how do you use it?

Illustration of Wake-on-LAN
© Iconfinder
Was this page helpful?

Wake-on-LAN (WoL) is a network standard that allows a computer to be turned on remotely, whether it's hibernating, sleeping, or even completely powered off. It works be receiving what's called a magic packet that's sent from a WoL client.

It also doesn't matter what operating system the computer will eventually boot into (Windows, Mac, Ubuntu, etc.) - Wake-on-LAN can be used to turn on any computer that receives the magic packet.

A computer's hardware has to support Wake-on-LAN with a compatible BIOS and network interface card. This means that not every single computer is automatically viable for Wake-on-LAN.

Wake-on-LAN is sometimes called wake up on LAN, wake on LAN, wake on WAN, resume by LAN, and remote wake-up.

How to Set up Wake-on-LAN

Enabling Wake-on-LAN is done in two parts, both of which are described below. The first step involves setting up the motherboard by configuring Wake-on-LAN through BIOS before the operating system boots, and the next is logging into the operating system and making some small changes there.

This means the first section below is valid for every computer, but after following the BIOS steps, skip down to your operating system instructions, whether it be for Windows, Mac, or Linux.

BIOS

The first thing you need to do to enable WoL is to set up BIOS correctly so that the software can listen for incoming wake up requests.

Note: Every manufacturer will have unique steps, so what you see below probably won't describe your setup exactly. If these instructions aren't helping, find out your BIOS manufacturer and check their website for a user manual on how to get into BIOS and find the WoL feature.

  1. Enter BIOS instead of booting to your operating system.
  1. Look for a section that pertains to power, like Power Management, or maybe an Advanced section. Other manufacturers might call it Resume On LAN(MAC).

    If you're having troubles finding the Wake-on-LAN option, just dig around. Most BIOS screens have a help section off to the side that describes what each setting does when enabled. It's possible that the name of the WoL option in your computer's BIOS isn't clear.

    Tip: If your mouse doesn't work in BIOS, try using your keyboard to navigate around. Not all BIOS setup pages support the mouse.
  2. Once you find it, you can most likely press Enter to either immediately toggle it on or to show a small menu that you can then choose between on/off or enable/disable.
  3. Make sure to save the changes. This, again, isn't the same on every computer but it might be a key like F10. The bottom of the BIOS screen should give some instructions about saving and exiting.

Windows

Enabling Wake-on-LAN in Windows is done through Device Manager. There are a few different things to enable here:

  1. Open Device Manager.
  2. Find and open the Network adapters section. You can either double-click/double-tap on Network adapters or select the small + or > button next to it to expand that section.
  1. Right-click or tap-and-hold the adapter that belongs to the active internet connection.

    It might read something like Realtek PCIe GBE Family Controller or Intel Network Connection. You can ignore any Bluetooth connections and virtual adapters.
  2. Choose Properties.
  3. Open the Advanced tab.
  4. Under the Property section, click or tap Wake on Magic Packet.

    Note: Skip down to Step 8 if you can't find this property; Wake-on-LAN might still work anyway.
  5. Go into the Value menu on the right and choose Enabled.
  6. Open the Power Management tab. It might instead be called Power depending on your version of Windows or network card.
  1. Make sure these two options are enabled: Allow this device to wake the computer and Only allow a magic packet to wake the computer.

    It might instead be under a section called Wake on LAN, and be called Wake on Magic Packet.

    Note: If you don't see these options or they're greyed out, try updating the network adapter's device drivers, but remember that it's possible that your network card just isn't supported. This is most likely true for wireless NICs.
  2. Click/tap OK to save the changes and exit that window.
  3. You can also close down Device Manager.

Mac

If your Mac is running at version 10.6 or above, Wake on Demand should be enabled by default. Otherwise, follow these steps:

  1. Open System Preferences from the Apple menu.
  2. Go to View > Energy Saver.
  3. Put a check in the box next to Wake for network access.

    Note: This option is called Wake for network access only if your Mac supports Wake on Demand over Ethernet and AirPort. It's instead called Wake for Ethernet network access or Wake for Wi-Fi network access if Wake on Demand only works over one of the two.

Linux

The steps for turning on Wake-on-LAN for Linux are most likely not the same for every Linux OS, but we'll look at how to do it in Ubuntu:

  1. Search for and open Terminal, or hit the Ctrl+Alt+T shortcut.
  2. Install ethtool with this command:
    sudo apt-get install ethtool
  3. See if your computer is able to support Wake-on-LAN:
    sudo ethtool eth0
    Note: eth0 might not be your default network interface, in which case you need to modify the command to reflect that. The ifconfig -a command will list all the available interfaces; you're looking just for the ones with a valid "inet addr" (IP address).

    Look for the "Supports Wake-on" value. If there's a "g" there, then Wake-on-LAN can be enabled.
  1. Set up Wake-on-LAN on Ubuntu:
    sudo ethtool -s eth0 wol g
  2. After the command is run, you can rerun the one from Step 2 to make sure that the "Wake-on" value is "g" instead of "d."

Note: See this Synology Router Manager help article if you need help setting up a Synology router with Wake-on-LAN.

How to Use Wake-on-LAN

Now that the computer is fully set up to utilize Wake-on-LAN, you need a program that can send the magic packet required to actually instigate the startup.

TeamViewer is one example of a free remote access tool that supports Wake-on-LAN. Since TeamViewer is made specifically for remote access, its WoL function is handy for those times when you need in to your computer when away but you forgot to turn it on before you left.

Note: TeamViewer can utilize Wake-on-LAN in two ways. One is via the network's public IP address and the other is through another TeamViewer account on the same network (assuming this other computer is on). This lets you wake the computer without having to configure router ports (there's more on that below) since the other local computer that has TeamViewer installed can relay the WoL request internally.

Another great Wake-on-LAN tool is Depicus, and it works from a variety of places. You can use their WoL feature through their website without having to download anything, but they also have a GUI and command line tool available for both Windows (for free) and macOS, plus Wake-on-LAN mobile apps for Android and iOS.

Some other free Wake-on-LAN apps include Wake On LAN for Android and RemoteBoot WOL for iOS.

WakeOnLan is another free WoL tool for macOS, and Windows users can also opt for Wake On Lan Magic Packets.

One Wake-on-LAN tool that runs on Ubuntu is called powerwake. Install it with the sudo apt-get install powerwake command. Once installed, enter "powerwake" followed by the IP address or hostname that should be turned on, like this: powerwake 192.168.1.115 or powerwake my-computer.local.

Wake-on-LAN Not Working?

If you've followed the steps above, found that your hardware supports Wake-on-LAN without any issues, but it's still not working when you try to turn the computer on, you might also need to enable it through your router. To do this, you need to log into your router to make some changes.

The magic packet that turns on the computer is normally sent as a UDP datagram over port 7 or 9. If this is the case with the program you're using to send the packet, and you're trying this from outside the network, you need to open those ports on the router and forward requests to every IP address on the network.

Note: Forwarding WoL magic packets to a specific client IP address would be pointless since the powered down computer doesn't have an active IP address.

However, since a specific IP address is necessary when forwarding ports, you want to make sure the port(s) are forwarded to what's known as the broadcast address so that it reaches every client computer. This address is in the format *.*.*.255.

For example, if you determine your router's IP address to be 192.168.1.1, then use the 192.168.1.255 address as the forwarding port. If it's 192.168.2.1, you'd use 192.168.2.255. The same is true for other addresses like 10.0.0.2, which would use the 10.0.0.255 IP address as the forwarding address.

See the Port Forward website for detailed instructions on forwarding ports to your specific router.

You might also consider subscribing to a dynamic DNS service like No-IP. That way, even if the IP address tied to the WoL network changes, the DNS service will update to reflect that change and still let you wake up the computer.

The DDNS service is really only helpful when turning your computer on from outside the network, like from your phone when you're not home.

More Information on Wake-on-LAN

The standard magic packet used to wake a computer works below the Internet Protocol layer, so it's usually unnecessary to specify IP address or DNS information; a MAC address is normally required instead. However, this isn't always the case, and sometimes a subnet mask is needed too.

The typical magic packet also does not return with a message indicating whether it successfully reached the client and actually turned the computer on. What normally happens is that you wait several minutes after the packet is sent, and then check whether the computer is on by doing whatever it is you wanted to do with the computer once it was powered on.

Wake on Wireless LAN (WoWLAN)

Most laptops do not support Wake-on-LAN for Wi-Fi, officially called Wake on Wireless LAN, or WoWLAN. The ones that do need to have BIOS support for Wake-on-LAN and need to be using Intel Centrino Process Technology or newer.

The reason most wireless network cards do not support WoL over Wi-Fi is because the magic packet is sent to the network card when it's in a low power state, and a laptop (or wireless-only desktop) that isn't authenticated with the network and is completely shut down, has no way to listen for the magic packet, and therefore won't know if one is sent over the network.

For most computers, Wake-on-LAN works over Wi-Fi only if the wireless device is the one sending the WoL request. In other words, it works if the laptop, tablet, phone, etc., is waking up a computer but not the other way around.

See this Microsoft document on Wake on Wireless LAN to learn how it works with Windows.