Wake a computer remotely with Wake-on-LAN
A computer that sleeps saves energy, but it can't answer a remote connection. Wake-on-LAN solves that: a special network packet tells the sleeping computer to wake up. It is old and reliable technology, with one catch that trips up most people. Here is how it works, how to set it up on a Mac and a PC, and what to check when it doesn't work.
How Wake-on-LAN works
While a computer sleeps, its network adapter stays powered and listens for one thing: a magic packet. The packet contains six bytes of FF followed by the adapter's hardware address (MAC address) repeated 16 times. When the adapter sees it, it wakes the computer.
The packet is usually sent as a broadcast to every device in the local network. That is the catch: routers don't pass broadcasts on, so a magic packet sent from the internet doesn't reach a sleeping computer by itself. Something inside the same network has to send it.
Set it up
On a Mac
- In System Settings, turn on waking for network access: under Energy on a desktop Mac, under Battery › Options on a MacBook, where you also choose when it applies.
- Macs wake from sleep, not from being shut down. A Mac you want to reach should sleep rather than shut down.
- Over a network cable, waking is the most reliable; over Wi-Fi it depends on the model and the network.
On a Windows PC
- In the BIOS or UEFI setup, turn on Wake-on-LAN; it is sometimes called “Power on by PCI-E” or “Resume by LAN”.
- In Device Manager, open the network adapter's properties. On the Power Management tab, allow it to wake the computer and, if offered, only with a magic packet; on the Advanced tab, turn on Wake on Magic Packet.
- Windows' Fast Startup can stop a PC that was shut down from waking. If it wakes from sleep but not from shut down, turn Fast Startup off.
Waking a computer from outside its network
Because the packet has to come from inside the network, there are three common ways:
- A helper in the network – another computer, a NAS or a small always-on device – that sends the packet when you ask it to.
- A router that can send it, as some routers offer in their web interface or app.
- Forwarding the packet from the internet to the network's broadcast address. Many routers don't allow it, and it opens the router to the internet, so it is the least attractive option.
How ShareDesk wakes computers
ShareDesk takes the first way, with the computers you already have. When a computer in your address book sleeps, choose Wake Up in the app or on the website. Another computer with ShareDesk that is online in the same network sends the magic packet, and the sleeping computer wakes and comes online in ShareDesk. For this, our server remembers each computer's last network addresses.
In practice: in an office, one computer that is always on – a server, a Mac mini or the reception PC – is enough to wake all the others. At home, it can be any computer that stays awake. Once the computer is awake, connect as usual, with the password for unattended access if nobody is there.
When it doesn't wake
- Shut down instead of asleep: Macs only wake from sleep, and many PCs only wake from shut down when the BIOS and Windows allow it.
- Wi-Fi: waking over Wi-Fi is unreliable on most computers. Use a cable for computers you want to wake.
- No helper online: the packet needs a sender in the same network. Check that another computer there is on and online.
- Another network segment: broadcasts don't cross VLANs or subnets unless the network equipment is set up for it.
- After a power cut, some PCs don't react until they have been switched on once by hand. A BIOS option to power on after a power loss helps.
- New network adapter or dock: the MAC address changes with it. Let the computer come online once so its new address is known.
- A laptop with its lid closed or on battery often doesn't wake from the network at all.
Frequently asked questions
Does Wake-on-LAN work over the internet?
Not directly: the magic packet is a broadcast in the local network, and routers don't forward it. You need a sender in the same network, such as another computer, or a router that can send it.
Does Wake-on-LAN work over Wi-Fi?
Sometimes. Many computers can't be woken over Wi-Fi at all, and others only in some cases. A network cable is the reliable choice.
Can I wake a computer that is shut down?
Many PCs can, if Wake-on-LAN is on in the BIOS and Windows' Fast Startup doesn't get in the way. Macs only wake from sleep.
What do I need for Wake-on-LAN with ShareDesk?
The computer must have been online in ShareDesk before, so its network address is known, it must allow waking over the network, and another computer with ShareDesk must be online in the same network.