Wake-On-LAN Tools and Commands: A Practical Guide for Admins

Wake-On-LAN Tools and Commands: A Practical Guide for Admins

Date: March 4, 2026

Overview

  • Wake-On-LAN (WOL) lets administrators send a “magic packet” to remotely power on or wake a computer with a compatible network interface and BIOS/UEFI support. It works at the link-layer using the target NIC’s MAC address; routers/firewalls and subnet boundaries may require extra configuration.

Prerequisites

  • Target device’s NIC and BIOS/UEFI support WOL and are enabled.
  • The OS allows the NIC to receive magic packets when powered off/hibernating (driver power settings).
  • You have the target machine’s MAC address and, for wake-over-internet, its public IP or a relay on the target network and any needed port-forwarding.
  • Switches must forward the packet to the correct local network or use directed broadcast if supported.

Common Tools (CLI and GUI)

  • etherwake (Linux) — simple CLI to send magic packets.
  • wakeonlan (Linux/Perl/Python) — sends WOL packets; easy scripting.
  • wolcmd / WakeMeOnLan (Windows) — command-line and GUI utilities from NirSoft and others.
  • PowerShell — Send-WOL scripts and modules (Send-WOL function).
  • Depicus Wake On LAN (Windows/Linux/macOS) — GUI and CLI tools.
  • Mobile apps — numerous Android/iOS apps for sending magic packets over LAN or via VPN.
  • Network management platforms (ABLE, MeshCentral, RMM tools) — integrated WOL features for fleets.

Key Commands and Examples

  • Linux: etherwake

    Code

    sudo etherwake -i eth0 00:11:22:33:44:55
  • Linux: wakeonlan

    Code

    wakeonlan 00:11:22:33:44:55
  • Windows PowerShell (simple Send-WOL)

    powershell

    function Send-WOL(\(mac</span><span class="token" style="color: rgb(57, 58, 52);">)</span><span> </span><span class="token" style="color: rgb(57, 58, 52);">{</span><span> </span><span></span><span class="token" style="color: rgb(54, 172, 170);">\)macBytes = (\(mac</span><span> </span><span class="token" style="color: rgb(57, 58, 52);">-</span><span>split </span><span class="token" style="color: rgb(163, 21, 21);">'(:|-)'</span><span class="token" style="color: rgb(57, 58, 52);">)</span><span> </span><span class="token" style="color: rgb(57, 58, 52);">|</span><span> </span><span class="token" style="color: rgb(57, 58, 52);">ForEach-Object</span><span> </span><span class="token" style="color: rgb(57, 58, 52);">{</span><span> </span><span class="token">[byte]</span><span>::Parse</span><span class="token" style="color: rgb(57, 58, 52);">(</span><span class="token" style="color: rgb(54, 172, 170);">\), ‘HexNumber’) } \(packet</span><span> = </span><span class="token" style="color: rgb(57, 58, 52);">(</span><span class="token">[byte[]]</span><span class="token" style="color: rgb(57, 58, 52);">(</span><span class="token" style="color: rgb(57, 58, 52);">,</span><span>0xFF </span><span class="token" style="color: rgb(57, 58, 52);">*</span><span> 6</span><span class="token" style="color: rgb(57, 58, 52);">)</span><span class="token" style="color: rgb(57, 58, 52);">)</span><span> </span><span class="token" style="color: rgb(57, 58, 52);">+</span><span> </span><span class="token" style="color: rgb(57, 58, 52);">(</span><span class="token" style="color: rgb(54, 172, 170);">\)macBytes * 16) \(udp</span><span> = </span><span class="token" style="color: rgb(57, 58, 52);">New-Object</span><span> System</span><span class="token" style="color: rgb(57, 58, 52);">.</span><span>Net</span><span class="token" style="color: rgb(57, 58, 52);">.</span><span>Sockets</span><span class="token" style="color: rgb(57, 58, 52);">.</span><span>UdpClient </span><span> </span><span class="token" style="color: rgb(54, 172, 170);">\)udp.EnableBroadcast = \(true</span><span> </span><span> </span><span class="token" style="color: rgb(54, 172, 170);">\)udp.Send(\(packet</span><span class="token" style="color: rgb(57, 58, 52);">,</span><span> </span><span class="token" style="color: rgb(54, 172, 170);">\)packet.Length, [System.Net.IPEndPoint]::new([System.Net.IPAddress]::Broadcast, 9)) $udp.Close() } Send-WOL “00-11-22-33-44-55”
  • Windows: wolcmd (example)

    Code

    wolcmd 001122334455 192.168.1.255 255.255.255.0 9

Advanced Scenarios

  • Across subnets: use directed broadcasts (router must allow) or place a WOL relay/agent on target subnet.
  • Over the internet: forward UDP port (commonly 7 or 9) to the target network’s broadcast address or use a VPN or remote agent to relay the magic packet.
  • Secure WOL: restrict which hosts can send WOL through firewall rules, use VPNs, or authenticated remote management (iLO, IPMI, AMT) instead of unauthenticated magic packets.
  • Wake from sleep/hibernation: ensure OS and NIC power management allow magic-packet wake; Windows Device Manager settings: allow this device to wake the computer and only allow a magic packet to wake the computer.

Troubleshooting Checklist

  1. Confirm BIOS/UEFI WOL option is enabled.
  2. Verify NIC driver/win/linux power settings permit WOL.
  3. Check MAC address is correct (physical NIC, not virtual).
  4. Test on same LAN segment first using broadcast.
  5. If not waking across routers, try directed broadcast or a relay.
  6. Inspect firewall rules and ensure UDP broadcast is allowed on chosen port.
  7. For virtualized/bridged NICs, confirm host/VM support and passthrough.
  8. Use packet capture (tcpdump/Wireshark) to see if magic packet reaches NIC.

Best Practices for Admins

  • Keep an inventory of MAC addresses and corresponding static DHCP reservations.
  • Use management VLANs and WOL relays for cross-subnet wakes.
  • Prefer secure remote management (iDRAC/iLO/AMT) for power control where available.
  • Log WOL usage in your RMM or management tool for auditing.
  • Test periodic wake scenarios after firmware, driver, or OS updates.

Quick Reference: Packet Format

  • Magic packet: 6 bytes of 0xFF followed by 16 repetitions of the target MAC address (6 bytes each). Sent via UDP (commonly to ports 7 or 9) or raw Ethernet broadcast.

If you want, I can:

  • provide a ready-to-run PowerShell script for your environment (Windows domain or single host),
  • give commands for a specific OS/distribution,
  • or craft firewall/router NAT

Comments

Leave a Reply