How Wake-on-LAN Actually Works
Wake-on-LAN (WoL) lets you power on a computer that's shut down or sleeping by sending it a specially crafted network packet called a magic packet. The magic packet consists of six bytes of 0xFF followed by the target machine's MAC address repeated 16 times. Even when a PC is fully powered off, its network interface controller (NIC) can stay in a low-power standby state, listening for this exact pattern on the wire. When it sees its own MAC address repeated in that pattern, it signals the motherboard to power the system on — no OS needs to be running yet for this to work, since it happens at the NIC firmware level.
Step 1: Enable WoL in the Target PC's BIOS/UEFI
- Reboot the target machine and enter BIOS/UEFI setup (
DelorF2on most boards). - Find the power management section, often called Power Management Setup or under Advanced.
- Enable Wake on LAN, sometimes labeled Power On By PCI-E/PCI or Resume by LAN.
- Save and exit.
Step 2: Enable It in the Network Adapter's Windows Driver Settings
- Open Device Manager, expand Network adapters, and double-click your wired Ethernet adapter (WoL generally does not work reliably over Wi-Fi, even on adapters that claim support — use a wired connection for this).
- Go to the Power Management tab and check Allow this device to wake the computer. Optionally also check Only allow a magic packet to wake the computer so random network noise doesn't wake it unexpectedly.
- Go to the Advanced tab, find a property named Wake on Magic Packet (naming varies by NIC vendor) and set it to Enabled.
Step 3: Note the Target's MAC Address
On the target machine, open Command Prompt and run:
ipconfig /all
Find the Physical Address line under the wired Ethernet adapter — it looks like A4-BB-6D-12-34-56. You'll need this exact value to build the magic packet.
Step 4: Send the Magic Packet
From another device on the same local network, use a WoL utility to send the packet. On Windows, a lightweight free tool like WOL Magic Packet Sender or the command-line wolcmd works, or use PowerShell directly:
$mac = "A4BB6D123456"
$broadcast = ([System.Net.IPAddress]::Parse("255.255.255.255"))
$port = 9
$MACByteArray = $mac -split '(..)' | Where-Object {$_} | ForEach-Object { [Convert]::ToByte($_, 16) }
$UDPclient = New-Object System.Net.Sockets.UdpClient
$UDPclient.Connect($broadcast, $port)
$packet = [byte[]](,0xFF * 6) + ($MACByteArray * 16)
$UDPclient.Send($packet, $packet.Length) | Out-Null
$UDPclient.Close()
On Linux, the wakeonlan package makes this a one-liner:
sudo apt install wakeonlan
wakeonlan A4:BB:6D:12:34:56
On Android or iOS, apps like Wake On Lan (various free apps on both stores) do the same thing from your phone as long as you're on the same Wi-Fi network as the target, or reaching it through a VPN back into that LAN.
Waking a Machine From Outside Your LAN
Magic packets are normally sent as a broadcast (255.255.255.255) within a local subnet, so waking a machine over the internet requires one extra step: your router needs to forward a UDP port (commonly 7 or 9) to your LAN's broadcast address, or you need a VPN connection (like WireGuard or your router's built-in VPN server) into your home network first. Most consumer routers support a subnet-directed broadcast forwarding rule for exactly this purpose — check your router's port forwarding section for a "Wake-on-LAN" or "WOL" option, or forward the chosen port to x.x.x.255 (your LAN's broadcast address) rather than to a single device IP.
Troubleshooting
- Nothing happens — double-check the MAC address was typed correctly, and confirm you're sending from a device on the same subnet (or that broadcast forwarding/VPN is correctly configured for remote wake).
- Works from Sleep but not Shutdown — disable Fast Startup as described above, and confirm the BIOS setting wasn't reset by a firmware update.
- Works once then stops — some NICs need "Only allow a magic packet to wake the computer" specifically checked, otherwise Windows re-disables wake permissions after certain updates; recheck the Power Management tab after any driver update.
Discussion & Insights