Skip to content
Bytearium

No ads or affiliate links active

Networking

Wake-on-LAN: waking a PC with a magic packet

Wake-on-LAN wakes a computer with a magic packet sent to its MAC address. Which three switches must be on and how to check it on Linux.

This entry is still below our minimum bar for the search index (length and number of sources) and is being reworked. It is therefore not listed in search engines.

Your server sleeps in the cellar, you are on the sofa, and the stairs are the problem. A magic packet takes the stairs for you.

The short answer

Wake-on-LAN (WoL) powers on or wakes a computer when its network card receives a special frame, the magic packet, which contains the card's MAC address [1]. It works only if the hardware, the firmware settings and the operating system all allow it, and the packet usually has to originate inside the same local network. Our assessment: WoL is a convenience for machines you want off most of the time, not a remote access method on its own.

How it works

  1. The magic packet. A magic packet starts with six bytes of FF, followed by the target's MAC address repeated sixteen times, and optionally a password of four or six bytes [1]. The network card watches incoming traffic for this pattern while the rest of the machine is off or asleep.
  2. Origin of the technology. Wireshark's documentation describes WoL as the name of the Magic Packet technology developed by AMD and Hewlett-Packard [1]. AMD's white paper is the original description [2].
  3. Transport. According to Wireshark's documentation, the pattern can sit anywhere in the payload of an Ethernet frame, and implementations exist that send it directly over Ethernet or over UDP [1]. Many tools use UDP port 9 or 7, but that is a convention, not part of the format (our observation, unverified as a standard).
  4. Three switches must be on. First, the firmware (BIOS or UEFI) must permit wake-up from the network card. Second, the card must be armed in the operating system. On Linux, ethtool <interface> shows Supports Wake-on and Wake-on; the letter g means wake on magic packet and d means disabled [3]. Third, the card needs standby power, which a fully unplugged machine does not have.
  5. Arming does not survive a reboot by default. ethtool -s <interface> wol g sets the mode, but a how-to by sleeplessbeastie notes that this is not persistent [4]. With systemd-networkd, a .link file with WakeOnLan=magic makes it permanent [4].
  6. Across networks. A magic packet is normally broadcast inside one network segment. Our assessment: from outside, send it from a device that is already inside, such as a small always-on machine or a router that offers the function, instead of forwarding ports to a broadcast address. Behind CGNAT you have no inbound path at all (see Related pages).
  7. Security. Anyone who can send a broadcast in your segment and knows the MAC address can wake the machine. Optional passwords exist in the packet format, but support varies [1] (unverified for specific cards).

A homelab example

The Bytearium homelab runs rack servers (HPE ProLiant DL360 Gen9 and DL380 Gen10) and a QNAP NAS, as of 14 to 18 Oct 2026. We have not recorded WoL settings, so we say nothing about them. A general walkthrough for a Linux machine of your own: run ethtool enp2s0 | grep Wake-on with your interface name. If Supports Wake-on lists g but Wake-on shows d, run sudo ethtool -s enp2s0 wol g [3][4]. Then shut the machine down, and from another machine in the same network send a magic packet with a tool such as wakeonlan <MAC>. If nothing happens, look at the firmware setting first.

Checklist

  • Find the MAC address of the wired network card and write it down.
  • Check the firmware for a wake-up option on the network card and switch it on.
  • Run ethtool and read Supports Wake-on and Wake-on.
  • Set wol g and make it persistent, for example with a .link file [4].
  • Test from a second machine in the same network, with the target shut down.
  • Check that the machine keeps standby power to the card.
  • Avoid forwarding ports to a broadcast address.
  • Note which switch failed when it does not work.

Primary sources

These sources are the basis of this page. That does not mean every claim was checked individually; whether a review record exists is shown above under “Status”. The interpretation and checklist are our own work.

There is no documented review record for this version yet. The text relies on the sources listed.

How this page was made: Bytearium creates these pages with the help of AI and is responsible for publishing them. AI can be wrong, so we show our sources and review status openly.

  1. Wireshark ProjectWakeOnLAN
  2. AMDMagic Packet Technology
  3. Linux manual pagesethtool(8)
  4. sleeplessbeastieHow to configure Wake-on-LAN using systemd

This page has no ads and no affiliate links.