Revision as of 19:47, 7 April 2022 editTffqua (talk | contribs)36 edits rm patronising writing which included a link that defied all common senseTag: Reverted← Previous edit | Latest revision as of 22:39, 4 January 2025 edit undoKvng (talk | contribs)Extended confirmed users, New page reviewers108,107 edits review: link improvements | ||
(75 intermediate revisions by 28 users not shown) | |||
Line 1: | Line 1: | ||
{{short description|Mechanism to wake up computers via a network}} | {{short description|Mechanism to wake up computers via a network}} | ||
{{Use American English|date=April 2024}} | |||
] | ] | ||
'''Wake-on-LAN''' ('''WoL''' or '''WOL''') is an ] or ] ]ing standard that allows a computer to be turned on |
'''Wake-on-LAN''' ('''WoL''' or '''WOL''') is an ] or ] ]ing standard that allows a computer to be turned on or awakened from ] by a network message. It is based upon ]'s ''Magic Packet Technology'', which was co-developed by AMD and Hewlett-Packard, following its proposal as a standard in 1995. The standard saw quick adoption thereafter through ], ] and others. | ||
Equivalent terms include '''wake on WAN''', '''remote wake-up''', '''power on by LAN''', '''power up by LAN''', '''resume by LAN''', '''resume on LAN''' and '''wake up on LAN'''. If the computer being awakened is communicating via ], a supplementary standard called '''Wake on Wireless LAN''' (WoWLAN) must be employed.<ref>{{cite web |url=http://revolutionwifi.blogspot.com/2010/11/wake-on-wireless-lan.html |title=Wake on Wireless LAN |first=Andrew |last=von Nagy |date=8 November 2010 |work=Revolution Wi-Fi Blog |access-date=28 October 2015}}</ref> | Equivalent terms include '''wake on WAN''', '''remote wake-up''', '''power on by LAN''', '''power up by LAN''', '''resume by LAN''', '''resume on LAN''' and '''wake up on LAN'''. If the computer being awakened is communicating via ], a supplementary standard called '''Wake on Wireless LAN''' (WoWLAN) must be employed.<ref>{{cite web |url=http://revolutionwifi.blogspot.com/2010/11/wake-on-wireless-lan.html |title=Wake on Wireless LAN |first=Andrew |last=von Nagy |date=8 November 2010 |work=Revolution Wi-Fi Blog |access-date=28 October 2015}}</ref> | ||
The message is usually sent to the target computer by a program executed on a device connected to the same ] (LAN). It is also possible to initiate the message from another network by using ] or a WoL gateway service. | |||
⚫ | The WoL and WoWLAN standards are often supplemented by vendors to provide protocol-transparent on-demand services, for example in the ] wake-on-demand (]) feature.<ref name="macworld-glenn">{{cite journal |first=Glenn |last=Fleishman |title=Wake on Demand lets Snow Leopard sleep with one eye open |url=http://www.macworld.com/article/142468/2009/08/wake_on_demand.html |journal=] |date=28 August 2009 |access-date=15 September 2009 |quote=How it works, Energy Saver preference pane}}</ref> | ||
⚫ | The WoL and WoWLAN standards are often supplemented by vendors to provide protocol-transparent on-demand services, for example in the ] wake-on-demand (]) feature.<ref name="macworld-glenn">{{cite journal |first=Glenn |last=Fleishman |title=Wake on Demand lets Snow Leopard sleep with one eye open |url=http://www.macworld.com/article/142468/2009/08/wake_on_demand.html |journal=] |date=28 August 2009 |access-date=15 September 2009 |quote=How it works, Energy Saver preference pane |archive-date=16 September 2009 |archive-url=https://web.archive.org/web/20090916005930/http://www.macworld.com/article/142468/2009/08/wake_on_demand.html |url-status=dead }}</ref> | ||
==History== | ==History== | ||
The basis for the ''Wake-on-LAN''-industry standard mechanism today, was created around 1994 by ] in cooperation with ], who co-developed AMD's ''Magic Packet Technology'' and brought forth their following proposal for it in November 1995 in an AMD whitepaper.<ref name="AMD-WoL-Whitepaper">{{cite web |url=https://www.amd.com/content/dam/amd/en/documents/archived-tech-docs/white-papers/20213.pdf |title=Magic Packet Technology |type=white paper |id=20213, Rev: A Amendment/0 |publisher=AMD |date=November 1995 |access-date=25 December 2024}}</ref> It enabled a remote network device to be woken up through the underlying “power management circuitry”, by sending it a standard Ethernet frame, which “contains a specific data pattern detected by the Ethernet-controller on the receiving end”. | |||
⚫ | |||
AMD implemented the WoL mechanism in their ''AMD PCnet II''-Family of Ethernet controllers before. The term ''“Magic Packet”'' is a AMD trademark.<ref name="AMD-WoL-Whitepaper" /> | |||
⚫ | Wake-on-LAN saw wide adoption starting in October 1996, when ] formed the ''Advanced Manageability Alliance'' (AMA) with ]. In April 1997, this alliance adopted the Wake-on-LAN technology.<ref>{{cite web |url= http://www.computerworld.co.nz/article/519210/intel_ibm_strike_deal_lower_pc_ownership_costs/ |title=IBM, Intel strike deal to lower PC ownership costs |first=Kristi |last=Essick |work=] |location=New Zealand |date=31 October 1996 |archive-url=https://web.archive.org/web/20151208132411/http://www.computerworld.co.nz/article/519210/intel_ibm_strike_deal_lower_pc_ownership_costs/ |access-date=28 October 2015|archive-date=2015-12-08 }}</ref><ref>{{cite web|archive-url=https://web.archive.org/web/20121012155338/http://www-03.ibm.com/press/us/en/pressrelease/2705.wss |archive-date=2012-10-12 |url=http://www-03.ibm.com/press/us/en/pressrelease/2705.wss |title=IBM Announces Universal Management - Industry's Most Comprehensive Tools to Lower Total Cost of Ownership |date=14 April 1998 |work=IBM News Room |access-date=28 October 2015}}</ref> | ||
==Principle of operation== | ==Principle of operation== | ||
] connections, including home and work networks, wireless data networks |
] connections, including home and work networks, wireless data networks, and the ] itself, are based on frames sent between computers. WoL is implemented using a specially designed frame called a ], which is commonly sent to all computers in a network, among them the computer to be awakened. The magic packet contains the ] of the destination computer. This is an identifying number, built into each ] (NIC), that enables the NIC to be uniquely recognized and addressed on a network. In computers capable of Wake-on-LAN, the NIC(s) ''listen'' to incoming packets, even when the rest of the system is powered down. If a magic packet arrives and is addressed to the device's MAC address, the NIC signals the computer's ] or ] to awaken. This has the same effect as pressing the power button. | ||
The magic packet is |
The magic packet is ] on the ] to all attached devices on a given network, using the network ]; the ] (which relates to the ]) is not used. Because Wake-on-LAN is built upon broadcast messaging, it can generally only be used within a ]. Wake-on-LAN can, however, operate across any network in practice, given appropriate configuration and hardware, including remote wake-up across the Internet. | ||
⚫ | In order for Wake-on-LAN to work, parts of the network interface need to stay on. This consumes a small amount of ]. To further reduce power consumption, the link speed is usually reduced to the lowest possible speed (e.g. a Gigabit Ethernet NIC maintains only a 10 Mbit/s link). Disabling Wake-on-LAN, when not needed, can slightly reduce power consumption on computers that are switched off but still plugged into a power socket.<ref>{{cite web|url=http://www.lesswatts.org/tips/ethernet.php |work=Less Watts |title=Ethernet Tips & Tricks |url-status=dead |archive-url=https://web.archive.org/web/20071126071350/http://www.lesswatts.org/tips/ethernet.php |archive-date=November 26, 2007 }}</ref> The power drain becomes a consideration on battery-powered devices such as laptops as this can deplete the battery even when the device is completely shut down. | ||
Because Wake-on-LAN is built upon broadcast technology, it can generally only be used within the current network subnet. There are some exceptions, though, and Wake-on-LAN can operate across any network in practice, given appropriate configuration and hardware, including remote wake-up across the Internet. | |||
⚫ | In order for Wake-on-LAN to work, parts of the network interface need to stay on. This consumes a small amount of ] |
||
===Magic packet=== | ===Magic packet=== | ||
The ''magic packet'' is a ] that is most often sent as a ] and that contains anywhere within its payload 6 ] of all 255 (FF FF FF FF FF FF in ]), followed by sixteen repetitions of the target computer's 48-bit MAC address, for a total of 102 bytes. | The ''magic packet'' is a ] that is most often sent as a ] and that contains anywhere within its payload 6 ] of all 255 (FF FF FF FF FF FF in ]), followed by sixteen repetitions of the target computer's 48-bit MAC address, for a total of 102 bytes. | ||
Since the magic packet is only scanned for the string above, and not actually parsed by a full protocol stack, it could be sent as payload of any network- and transport-layer protocol, although it is typically sent as a ] ] to ] 0 (reserved port number),<ref>{{cite web |url=https://forums.ivanti.com/s/article/Understanding-Wake-On-LAN |title=Understanding Wake On LAN |work=LANdesk.com |access-date=28 October 2015}}</ref> 7 (]) or 9 (]),<ref>{{cite web|url=https://docs.microsoft.com/en-us/mem/configmgr/core/clients/deploy/plan/plan-wake-up-clients|title=Plan how to wake up clients in Configuration Manager|date=2019-04-23|website=]|access-date=2020-10-29|quote=... By default, traditional wake-up packets are transmitted by using UDP port 9...}}</ref> or directly over Ethernet |
Since the magic packet is only scanned for the string above, and not actually parsed by a full protocol stack, it could be sent as payload of any network- and transport-layer protocol, although it is typically sent as a ] ] to ] 0 (reserved port number),<ref>{{cite web |url=https://forums.ivanti.com/s/article/Understanding-Wake-On-LAN |title=Understanding Wake On LAN |work=LANdesk.com |access-date=28 October 2015}}</ref> 7 (]) or 9 (]),<ref>{{cite web|url=https://docs.microsoft.com/en-us/mem/configmgr/core/clients/deploy/plan/plan-wake-up-clients|title=Plan how to wake up clients in Configuration Manager|date=2019-04-23|website=]|access-date=2020-10-29|quote=... By default, traditional wake-up packets are transmitted by using UDP port 9...}}</ref> or directly over Ethernet using ] 0x0842.<ref>{{cite web |url=http://wiki.wireshark.org/WakeOnLAN |title=WakeOnLAN |website=Wireshark wiki |access-date=2023-09-27}}</ref> A ] transport-layer protocol like ] is less suited for this task as it requires establishing an active connection before sending user data. | ||
A standard magic packet has the following basic limitations: | A standard magic packet has the following basic limitations: | ||
* Requires destination computer MAC address (also may require a ''SecureOn'' password) | * Requires destination computer MAC address (also may require a ''SecureOn'' password) | ||
* Does not provide a delivery confirmation | * Does not provide a delivery confirmation | ||
* May not work outside of the local network | * May not work outside of the ] | ||
* Requires hardware support |
* Requires hardware support for Wake-on-LAN in the destination computer | ||
* Most 802.11 wireless interfaces do not maintain a link in low |
* Most 802.11 wireless interfaces do not maintain a link in low-power states and cannot receive a magic packet | ||
The Wake-on-LAN implementation is designed to be |
The Wake-on-LAN implementation is designed to be simple and to be quickly processed by the circuitry present on the network interface controller using minimal power. Because Wake-on-LAN operates below the IP protocol layer, IP addresses and DNS names are meaningless and so the MAC address is required. | ||
===Subnet directed broadcasts=== | ===Subnet directed broadcasts=== | ||
⚫ | A principal limitation of standard broadcast Wake-on-LAN is that broadcast packets are generally not routed. This prevents the technique being used in larger networks or over the Internet. ]s (SDBs)<ref>{{cite book |chapter-url= http://rtfm.adamant.net/books/tcp-ip_illustrated/broadcas.htm |title=TCP/IP Illustrated, Volume 1: The Protocols |chapter=Chapter 12. Broadcasting and Multicasting |first=W. Richard |last=Stevens |year=2007 |archive-url=https://web.archive.org/web/20141106194636/http://rtfm.adamant.net/books/tcp-ip_illustrated/broadcas.htm |access-date=28 October 2015|archive-date=2014-11-06 }}</ref><ref>{{cite web |url=http://www.rhyshaden.com/ipadd.htm |title=IP Addressing |first=Rhys |last=Haden |work=Data Network Resource |access-date=28 October 2015}}</ref> may be used to overcome this limitation. SDB may require changes to the intermediate router configuration. SDBs are treated like unicast network packets until processed by the final (local) router. This router then broadcasts the packet using a layer-2 broadcast. This technique allows a broadcast to be initiated on a remote network but requires all intervening routers to forward the SDB.<ref>{{cite web |url=http://support.amd.com/TechDocs/20213.pdf |archiveurl=https://web.archive.org/web/20141006072000/http://support.amd.com/TechDocs/20213.pdf |title=Magic Packet Technology (White Paper, Publication# 20213, Rev: A Amendment/0) |work=AMD |date=November 1995 |access-date=28 October 2015 |archive-date=6 October 2014}}</ref><ref>{{cite web |url= https://technet.microsoft.com/en-us/library/bb632807.aspx |title=About Subnet-Directed Broadcast Wake-Up Packets for Wake On LAN |work=Microsoft System Center Configuration Manager |year=2007 |archive-url=https://web.archive.org/web/20170630165037/https://technet.microsoft.com/en-us/library/bb632807.aspx |access-date=28 October 2015|archive-date=2017-06-30 }}</ref> When preparing a network to forward SDB packets, care must be taken to filter packets so that only desired (e.g. WoL) SDB packets are permitted{{snd}}otherwise the network may become a participant in ] attacks such as the ].<ref>{{cite web |url=https://www.packetcoders.io/local-vs-directed-broadcasts/ |title=Local vs Directed Broadcasts |date=5 April 2018 |access-date=2023-12-07}}</ref> | ||
⚫ | A principal limitation of standard broadcast |
||
===Troubleshooting magic packets=== | ===Troubleshooting magic packets=== | ||
⚫ | Wake-on-LAN can be a difficult technology to implement because it requires appropriate BIOS/], network interface hardware and, sometimes, operating system and router support to function reliably. In some cases, hardware may wake from one low-power state but not from others. This means that due to hardware issues the computer may be wakeable from its ] but doesn't wake from sleep or hibernation or vice versa. | ||
⚫ | Starting with ], the operating system logs all wake sources in the ''System'' event log. The ] and the <code>powercfg.exe /lastwake</code> command can retrieve them.<ref name="download.microsoft.com">{{cite web |url=http://download.microsoft.com/download/5/b/9/5b97017b-e28a-4bae-ba48-174cf47d23cd/cpa002_wh06.ppt |title=ACPI In Windows Vista |first=Allen |last=Marshall |work=] |publisher=Microsoft |pages=23–25}}</ref> | ||
⚫ | Wake-on-LAN can be a difficult technology to implement |
||
In that case, software tools like a ] can help with Wake-on-LAN troubleshooting as they allow confirming (while the PC is still on) that the magic packet is indeed visible to a particular computer's NIC. The same magic packet can then be used to find out if the computer powers up from an offline state. This allows networking issues to be isolated from other hardware issues. In some cases they also confirm that the packet was destined for a specific PC or sent to a ] and they can additionally show the packet's internals. | |||
⚫ | Starting with Windows Vista, the operating system logs all wake sources in the |
||
==Security considerations== | ==Security considerations== | ||
===Unauthorized access=== | ===Unauthorized access=== | ||
⚫ | Magic packets are sent via the ], which can be used or abused by anyone on the same LAN, unless the L2 LAN equipment is capable of and configured for filtering such traffic to match site-wide security requirements. | ||
⚫ | Firewalls may be used to prevent ] among the public ] from accessing the broadcast addresses of inside LAN segments, or routers may be configured to ignore subnet-directed broadcasts. | ||
⚫ | Magic packets are sent via the ], which can be used or abused by anyone on the same LAN, unless the L2 LAN equipment is capable of |
||
⚫ | Certain NICs support a security feature called "SecureOn". It allows users to store within the NIC a hexadecimal password of 6 bytes. Clients append this password to the magic packet. The NIC wakes the system only if the MAC address and password are correct.<ref></ref> This security measure significantly decreases the risk of successful ]s, by increasing the search space by 48 bits (6 bytes), up to 2<sup>96</sup> combinations if the MAC address is entirely unknown. However, any network eavesdropping will expose the cleartext password. | ||
⚫ | Firewalls may be used to prevent clients among the public ] from accessing the broadcast addresses of inside LAN segments, or routers may be configured to ignore subnet-directed broadcasts |
||
⚫ | Certain NICs support a security feature called "SecureOn". It allows users to store within the NIC a hexadecimal password of 6 bytes. Clients |
||
Abuse of the Wake-on-LAN feature only allows computers to be switched on; it does not in itself bypass password and other forms of security, and is unable to power off the machine once on. However, many client computers attempt booting from a ] server when powered up by WoL. Therefore, a combination of ] and PXE servers on the network can sometimes be used to start a computer with an attacker's boot image, bypassing any security of the installed operating system and granting access to unprotected, local disks over the network. | Abuse of the Wake-on-LAN feature only allows computers to be switched on; it does not in itself bypass password and other forms of security, and is unable to power off the machine once on. However, many client computers attempt booting from a ] server when powered up by WoL. Therefore, a combination of ] and PXE servers on the network can sometimes be used to start a computer with an attacker's boot image, bypassing any security of the installed operating system and granting access to unprotected, local disks over the network. | ||
===Interactions with network access control=== | ===Interactions with network access control=== | ||
⚫ | The use of Wake-on-LAN technology on enterprise networks can sometimes conflict with network access control solutions such as ] MAC-based authentication, which may prevent magic packet delivery if a machine's WoL hardware has not been designed to maintain a live authentication session while in a sleep state.<ref>{{cite web |title=Understanding 802.1X Authentication with Wake-on-LAN |url=http://www.cisco.com/en/US/docs/switches/lan/catalyst6500/ios/12.2SX/configuration/guide/dot1x.html#wp1133592 |work=Cisco Catalyst 6500 Release 12.2SX Software Configuration Guide}}</ref> | ||
===Security=== | |||
⚫ | The use of Wake-on-LAN technology on enterprise networks can sometimes conflict with network access control solutions such as ] |
||
⚫ | Some PCs include technology built into the ] to improve security for Wake-on-LAN. For example, ] (a component of ] technology). AMT uses TLS encryption to secure an ] communication tunnel to an AMT-based PC for remote management commands such as Wake-on-LAN.<ref name="multiple-vPro-WP"/> | ||
===Data privacy=== | |||
⚫ | Some PCs include technology built into the ] to improve security for Wake-on-LAN. For example, ] (a component of ] technology) |
||
AMT secures the communication tunnel with ] (AES) 128-bit encryption and ] ] with modulus lengths of 2,048 bits.<ref>{{cite web |title=Advanced Encryption Standard (AES) Instructions Set |url=http://softwarecommunity.intel.com/articles/eng/3788.htm |publisher=Intel |archive-url=https://web.archive.org/web/20080924081412/http://softwarecommunity.intel.com/articles/eng/3788.htm |access-date=6 April 2008|archive-date=2008-09-24 }}</ref><ref>{{cite web |title=Hardening Measures Built into Intel Active Management Technology |url=http://softwarecommunity.intel.com/articles/eng/3703.htm |publisher=Intel |archive-url=https://web.archive.org/web/20080320005157/http://softwarecommunity.intel.com/articles/eng/3703.htm |access-date=11 June 2008|archive-date=2008-03-20 }}</ref> Because the encrypted communication is out-of-band, the PC's hardware and firmware receive the magic packet before network traffic reaches the software stack for the operating system (OS). Since the encrypted communication occurs ''below'' the OS level, it is less vulnerable to attacks by viruses, worms, and other threats that typically target the OS level.<ref name="multiple-vPro-WP">{{cite web |title=Intel Centrino 2 with vPro technology and Intel Core2 processor with vPro technology |url=http://download.intel.com/products/vpro/whitepaper/crossclient.pdf |publisher=Intel |archive-url=https://web.archive.org/web/20081206123107/http://download.intel.com/products/vpro/whitepaper/crossclient.pdf |access-date=7 August 2008|archive-date=2008-12-06 }}</ref> | |||
IT shops using Wake-on-LAN through the Intel AMT implementation can wake an AMT PC over network environments that require TLS-based security, such as ], ] |
IT shops using Wake-on-LAN through the Intel AMT implementation can wake an AMT PC over network environments that require TLS-based security, such as ], ] Self Defending Network (SDN), and ] ] (NAP) environments.<ref name="multiple-vPro-WP"/> The Intel implementation also works for ] networks.<ref name="multiple-vPro-WP"/> | ||
==Hardware requirements== | ==Hardware requirements== | ||
⚫ | Wake-on-LAN support is implemented on the ] of a computer and in the ]. It is consequently not dependent on the ] running on the computer. In order to get Wake-on-LAN to work, enabling this feature on the network interface card or on-board silicon is sometimes required. Details of how to do this depend upon the ] and the device driver. | ||
Wake-on-LAN support is implemented on the ] of a computer and the ], and is consequently not dependent on the operating system running on the hardware. Some ] can control Wake-on-LAN behaviour via NIC drivers. With older motherboards, if the network interface is a plug-in card rather than being integrated into the motherboard, the card may need to be connected to the motherboard by an additional cable. Motherboards with an embedded Ethernet controller which supports Wake-on-LAN do not need a cable. The power supply must meet ] 2.01 specifications. | |||
===Hardware implementations=== | |||
Older motherboards must have a WAKEUP-LINK header onboard connected to the network card via a special 3-pin cable; however, systems supporting the ] 2.2 standard and with a PCI 2.2 compliant network adapter card do not usually require a Wake-on-LAN cable as the required standby power is relayed through the PCI bus. | |||
⚫ | |||
Wake-on-LAN usually needs to be enabled in the Power Management section of a PC motherboard's BIOS/UEFI setup utility, although on some systems, such as Apple computers, it is enabled by default. On older systems the BIOS/UEFI setting may be referred to as WoL; on newer systems supporting PCI version 2.2, it may be referred to as PME (Power Management Events, which include WoL). It may also be necessary to configure the computer to reserve standby power for the network card when the system is shut down. | Wake-on-LAN usually needs to be enabled in the Power Management section of a PC motherboard's BIOS/UEFI setup utility, although on some systems, such as Apple computers, it is enabled by default. On older systems the BIOS/UEFI setting may be referred to as WoL; on newer systems supporting PCI version 2.2, it may be referred to as PME (Power Management Events, which include WoL). It may also be necessary to configure the computer to reserve standby power for the network card when the system is shut down. | ||
⚫ | With older motherboards, if the network interface is a plug-in card rather than being integrated into the motherboard there may be a header onboard connected to the network card via a special three-pin cable the card. Systems supporting the ] 2.2 standard and with a PCI 2.2 compliant network adapter card do not usually require a cable as the required standby power is relayed through the PCI bus.<ref>{{cite web |url=http://xlife.zuavra.net/index.php/60/ |archive-url=https://web.archive.org/web/20070308143030/http://xlife.zuavra.net/index.php/60/ |title=Xlife » Using Wake-On-LAN WoL/PME to power up your computer remotely |archive-date=8 March 2007 |work=zuavra.net |access-date=28 October 2015}}</ref> The power supply must meet ] 2.01 specifications. | ||
⚫ | |||
Laptops powered by the Intel Centrino |
Laptops powered by the Intel Centrino processor technology or newer<ref>{{cite web |url=http://www.intel.com/network/connectivity/products/wireless/prowireless_mobile.htm |title=Intel® PRO/Wireless 3945ABG Network Connection – Overview |work=Intel.com |archive-url=https://web.archive.org/web/20090201155041/http://www.intel.com/network/connectivity/products/wireless/prowireless_mobile.htm |access-date=28 October 2015|archive-date=2009-02-01 }}</ref> (with explicit BIOS/UEFI support) allow waking up the machine using Wake on Wireless LAN (WoWLAN). | ||
In most modern PCs, ] is notified of the |
In most modern PCs, ] is notified of the ''waking up'' and takes control of the power-up. In ACPI, OSPM must record the ''wake source'' or the device that is causing the power-up{{snd}}the device being the ''soft'' power switch, the NIC (via Wake-on-LAN), the cover being opened, a temperature change, etc.<ref name="download.microsoft.com"/> | ||
The |
The three-pin WoL interface on the motherboard consists of: pin 1, +5V DC (red); pin 2, ] (black); pin 3, wake signal (green or yellow).<ref>{{cite web |url=http://users.skynet.be/sky50985/optionsb.htm |archive-url=https://web.archive.org/web/20070121141824/http://users.skynet.be/sky50985/optionsb.htm | title=How to connect the UIRT2 B |archive-date=21 January 2007 |work=skynet.be |access-date=28 October 2015}}</ref> By supplying the pin-3 wake signal with +5V DC the computer will be triggered to power up provided WoL is enabled in the BIOS/UEFI configuration. | ||
==Software requirements== | ==Software requirements== | ||
{{ |
{{how-to|section|date=May 2021}} | ||
Software |
Software that sends a WoL magic packet is referred to in different circles as ''client'' or ''server'', which can be a source of confusion. While WoL hardware or firmware is arguably performing the role of a ''server'', Web-based interfaces that act as a gateway through which users can issue WoL packets without downloading a local client often become known as "The Wake On LAN Server" to users. Additionally, software that administers WoL capabilities from the host OS side may be carelessly referred to as a ''client'' on occasion; Machines running WoL generally tend to be end-user desktops, and as such, are ''clients'' in IT parlance. | ||
===Creating and sending the magic packet=== | ===Creating and sending the magic packet=== | ||
⚫ | Software to send WoL magic packets is available for all modern platforms, including ], Macintosh and Linux, plus many ]s. Examples include: Wake On LAN GUI, LAN Helper, Magic Packet Utility, NetWaker for Windows, Nirsoft WakeMeOnLAN, WakeOnLANx, EMCO WOL, Aquila Tech Wake on LAN, ManageEngine WOL utility, FusionFenix and SolarWinds WOL Tool.<ref>{{cite web|last1=p|first1=Jessica|title=Wake On Lan Tools|url=http://www.pcwdld.com/free-wake-on-lan-tools|website=PCWDLD.com|date=16 August 2016|access-date=9 September 2016}}</ref> There are also web sites that allow a magic packet to be sent online without charge.{{citation needed|date=September 2024}} Example ] for a developer to add Wake-on-LAN to a program is readily available in many ]s. The following example is in ]: | ||
<syntaxhighlight lang="python"> | |||
import socket | |||
def wol(luna_mac_address: bytes) -> None: | |||
"""Send a Wake-on-LAN magic packet to the specified MAC address.""" | |||
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) | |||
s.setsockopt(socket.SOL_SOCKET, socket.SO_BROADCAST, 1) | |||
magic = b"\xff" * 6 + luna_mac_address * 16 | |||
s.sendto(magic, ("<broadcast>", 7)) | |||
if __name__ == "__main__": | |||
⚫ | |||
# Pass to wol the MAC address of the Ethernet port of the appliance to wake up | |||
wol(b"\x00\x15\xB2\xAA\x5B\x00") | |||
</syntaxhighlight> | |||
===Ensuring the magic packet travels from source to destination=== | ===Ensuring the magic packet travels from source to destination=== | ||
If the sender is on the same subnet |
If the sender is on the same subnet or local area network as the computer to be awakened there are generally no issues. When sending over the Internet, and in particular where a ] (NAT) router is involved (as typically in most homes), special settings are often necessary. | ||
Further, the WoL protocol operates on a |
Further, the WoL protocol operates on a deeper level in the multi-layer networking architecture. To ensure the magic packet gets from source to destination while the destination is sleeping, the ] binding must typically be set in a NAT router. This allows the router to forward the magic packet to the sleeping computer at a networking layer below typical IP usage. In the NAT router, ARP binding requires a dedicated IP and the MAC address of the destination computer. There are some security implications associated with ARP binding (see ]); however, as long as none of the computers connected to the LAN are compromised, an attacker must use a computer that is connected directly to the target LAN (plugged into the LAN via cable, or by breaking through the Wi‑Fi connection security) to gain access to the LAN. | ||
Most home routers are able to send magic packets to LAN; for example, routers with the ], ] or ] firmware have a built-in Wake-on-LAN client. ] supports both Linux implementations for WoL |
Most home routers are able to send magic packets to a LAN; for example, routers with the ], ] or ] firmware have a built-in Wake-on-LAN client. ] supports both Linux implementations for WoL. | ||
===Responding to the magic packet=== | ===Responding to the magic packet=== | ||
Most WoL hardware functionally is typically blocked by default and needs to be enabled |
Most WoL hardware functionally is typically blocked by default and needs to be enabled using the system BIOS/UEFI setup. Further configuration from the OS is required in some cases, for example via the ] network card properties on Windows operating systems.<!--]--> | ||
====Microsoft Windows==== | ====Microsoft Windows==== | ||
Line 115: | Line 119: | ||
Newer versions of Microsoft Windows integrate WoL functionality into the Device Manager. This is available in the Power Management tab of each network device's driver properties. For full support of a device's WoL capabilities (such as the ability to wake from an ACPI S5 power off state), installation of the full driver suite from the network device manufacturer may be necessary, rather than the bare driver provided by Microsoft or the computer manufacturer. In most cases{{citation needed|date=March 2013}} correct BIOS/UEFI configuration is also required for WoL to function. | Newer versions of Microsoft Windows integrate WoL functionality into the Device Manager. This is available in the Power Management tab of each network device's driver properties. For full support of a device's WoL capabilities (such as the ability to wake from an ACPI S5 power off state), installation of the full driver suite from the network device manufacturer may be necessary, rather than the bare driver provided by Microsoft or the computer manufacturer. In most cases{{citation needed|date=March 2013}} correct BIOS/UEFI configuration is also required for WoL to function. | ||
The ability to wake from a hybrid shutdown state (S4) (aka Fast Startup) or a soft powered-off state (S5) is |
The ability to wake from a hybrid shutdown state (in which all user sessions are terminated and the system then enters S4 state) (aka Fast Startup, introduced in Windows 8 and Windows Server 2012) or a soft powered-off state (in which all user sessions are terminated and the system then enters S5 state) is not officially supported in Windows.<ref name="wolinwin">{{cite web |url= https://support.microsoft.com/en-us/kb/2776718 |title='Wake on LAN' (WOL) behavior in Windows 8 and Windows 8.1 |work=Microsoft |year=2015 |access-date=28 October 2015 |archive-url=https://web.archive.org/web/20160101213021/https://support.microsoft.com/en-us/kb/2776718 |archive-date=1 January 2016 |url-status=deviated}}</ref><ref>{{cite web |url=https://learn.microsoft.com/en-us/troubleshoot/windows-client/setup-upgrade-and-drivers/wake-on-lan-feature |title=Wake on LAN (WOL) behavior in Windows 10 |date=19 February 2024}}</ref><ref name="systempowerstates">{{cite web |url=https://learn.microsoft.com/en-us/windows/win32/power/system-power-states |title=System Power States |work=Microsoft |access-date=25 December 2024}}</ref><ref>{{cite web |url=https://support.hpe.com/hpsc/doc/public/display?docId=emr_na-c03774694|title=HP Support document |work=Hewlett-Packard Support Center |access-date=4 January 2018}}</ref> This is because of a change in the OS behavior which causes network adapters to be explicitly not armed for WoL when shutdown to these states occurs, so that those adapters don't consume power in what appears to the user to be a shutdown state, even though the system is just hibernating in a "hybrid shutdown" state. WOL from a non-hybrid hibernation state (in which the system enters S4 state without terminating user sessions) (i.e. when a user explicitly requests hibernation) or a sleep state (S3) is supported. However, some hardware will enable WoL from states that are unsupported by Windows.<ref name="wolinwin" /><ref name="systempowerstates" /> | ||
====Mac hardware ( |
====Mac hardware (macOS)==== | ||
Modern Mac hardware supports WoL functionality when the computer is in a sleep state, but it is not possible to wake up a Mac computer from a powered-off state. | Modern Mac hardware supports WoL functionality when the computer is in a sleep state, but it is not possible to wake up a Mac computer from a powered-off state. | ||
] and later support WoL, which is called Wake on Demand. On laptops, the feature is controlled via the macOS System Settings Battery panel, in the Options pop-up window. The ''Wake for network access'' item can be set to "Always", "Only on Power Adapter", or "Never"; "Always" enables Wake-on-LAN even when on battery power, but "Only on Power Adapter" enables it only when connected to a power supply. On desktops, the feature is controlled via the System Settings Energy Saver panel. Marking the ''Wake for network access'' checkbox enables Wake-on-LAN.<ref name="share-mac-resources">{{cite web |url=https://support.apple.com/guide/mac-help/share-your-mac-resources-when-its-in-sleep-mh27905/mac |title=Share your Mac resources when it's in sleep |website=Apple Support}}</ref> It can also be configured through the terminal using the ''pmset womp'' (wake on magic packet) command. | |||
The feature is controlled via the OS X System Preferences Energy Saver panel, in the Options tab. Marking the ''Wake for network access'' checkbox enables Wake-on-LAN. | |||
Apple's ] client management system can be used to send Wake-on-LAN packets, but there are also freeware and shareware |
Apple's ] client management system can be used to send Wake-on-LAN packets,<ref>{{cite web |url=https://support.apple.com/guide/remote-desktop/sleep-shut-down-log-out-or-restart-a-computer-apd5535ee19/mac |title=Sleep, shut down, log out, or restart a computer with Remote Desktop |website=Apple Support}}</ref> but there are also freeware and shareware macOS applications available. A mechanism called ], provided by Apple AirPort access points and Apple TVs, allows other machines on a LAN to cause a WoL packet to be sent to a host when that machine accesses one of the host's shared resources. | ||
On ] and later, the service is called Wake on Demand or ] and is synonymous with the Sleep Proxy Service. It comes enabled out of the box, but in previous versions of the operating system, the service needs to be enabled under the Energy Saver pane of ]. The network interface card may allow the service to function only on Wi‑Fi, only on Ethernet, or both.<ref>{{cite web |url=http://support.apple.com/kb/HT3774 |title=About Wake on Demand and Bonjour Sleep Proxy |work=apple.com |access-date=28 October 2015}}</ref> | |||
====Linux==== | ====Linux==== | ||
Wake-on-LAN support may be changed using a subfunction of the ] command |
Wake-on-LAN support may be changed using a subfunction of the ] command, for example: | ||
<syntaxhighlight lang="shell"> | |||
ethtool -s eth0 wol g | |||
</syntaxhighlight> | |||
==Other machine states and LAN wakeup signals== | ==Other machine states and LAN wakeup signals== | ||
Line 156: | Line 162: | ||
# A ] (VPN){{snd}}which makes the originator appear to be a member of the LAN. | # A ] (VPN){{snd}}which makes the originator appear to be a member of the LAN. | ||
# The Internet with local broadcasting{{snd}}some routers permit a packet received from the Internet to be broadcast to the entire LAN;<ref>{{cite web |url=http://portforward.com/english/routers/port_forwarding/routerindex.htm |title=Router Port Forwarding Guides |work=portforward.com |access-date=28 October 2015}}</ref> the default TCP or UDP ports preconfigured to relay WoL requests are usually ports 7 (]), 9 (]), or both. This proxy setting must be enabled in the router, and port forwarding rules may need to be configured in its embedded ] in order to accept magic packets coming from the internet side to these restricted port numbers, and to allow rebroadcasting them on the local network (normally to the same ports and the same TCP or UDP protocol). Such routers may also be configurable to use different port numbers for this proxying service. | # The Internet with local broadcasting{{snd}}some routers permit a packet received from the Internet to be broadcast to the entire LAN;<ref>{{cite web |url=http://portforward.com/english/routers/port_forwarding/routerindex.htm |title=Router Port Forwarding Guides |work=portforward.com |access-date=28 October 2015 |archive-url=https://web.archive.org/web/20151104035214/http://portforward.com/english/routers/port_forwarding/routerindex.htm |archive-date=4 November 2015 |url-status=dead}}</ref> the default TCP or UDP ports preconfigured to relay WoL requests are usually ports 7 (]), 9 (]), or both. This proxy setting must be enabled in the router, and port forwarding rules may need to be configured in its embedded ] in order to accept magic packets coming from the internet side to these restricted port numbers, and to allow rebroadcasting them on the local network (normally to the same ports and the same TCP or UDP protocol). Such routers may also be configurable to use different port numbers for this proxying service. | ||
# The Internet without local broadcasting{{snd}}if (as often) the firewall or router at the destination does not permit packets received from the Internet to be broadcast to the local network, Wake-on-Internet may still be achieved by sending the magic packet to any specified port of the destination's Internet address, having previously set the firewall or router to forward packets arriving at that port to the local IP address of the computer being woken. The router may require reservation of the local IP address of the computer being woken in order to forward packets to it when it is not live. | # The Internet without local broadcasting{{snd}}if (as often) the firewall or router at the destination does not permit packets received from the Internet to be broadcast to the local network, Wake-on-Internet may still be achieved by sending the magic packet to any specified port of the destination's Internet address, having previously set the firewall or router to forward packets arriving at that port to the local IP address of the computer being woken. The router may require reservation of the local IP address of the computer being woken in order to forward packets to it when it is not live. | ||
Line 169: | Line 175: | ||
==References== | ==References== | ||
{{Reflist |
{{Reflist}} | ||
{{Firmware and booting}} | |||
{{DEFAULTSORT:Wake-On-Lan}} | {{DEFAULTSORT:Wake-On-Lan}} |
Latest revision as of 22:39, 4 January 2025
Mechanism to wake up computers via a network
Wake-on-LAN (WoL or WOL) is an Ethernet or Token Ring computer networking standard that allows a computer to be turned on or awakened from sleep mode by a network message. It is based upon AMD's Magic Packet Technology, which was co-developed by AMD and Hewlett-Packard, following its proposal as a standard in 1995. The standard saw quick adoption thereafter through IBM, Intel and others.
Equivalent terms include wake on WAN, remote wake-up, power on by LAN, power up by LAN, resume by LAN, resume on LAN and wake up on LAN. If the computer being awakened is communicating via Wi-Fi, a supplementary standard called Wake on Wireless LAN (WoWLAN) must be employed.
The message is usually sent to the target computer by a program executed on a device connected to the same local area network (LAN). It is also possible to initiate the message from another network by using subnet directed broadcasts or a WoL gateway service.
The WoL and WoWLAN standards are often supplemented by vendors to provide protocol-transparent on-demand services, for example in the Apple Bonjour wake-on-demand (Sleep Proxy) feature.
History
The basis for the Wake-on-LAN-industry standard mechanism today, was created around 1994 by AMD in cooperation with Hewlett-Packard, who co-developed AMD's Magic Packet Technology and brought forth their following proposal for it in November 1995 in an AMD whitepaper. It enabled a remote network device to be woken up through the underlying “power management circuitry”, by sending it a standard Ethernet frame, which “contains a specific data pattern detected by the Ethernet-controller on the receiving end”.
AMD implemented the WoL mechanism in their AMD PCnet II-Family of Ethernet controllers before. The term “Magic Packet” is a AMD trademark.
Wake-on-LAN saw wide adoption starting in October 1996, when IBM formed the Advanced Manageability Alliance (AMA) with Intel. In April 1997, this alliance adopted the Wake-on-LAN technology.
Principle of operation
Ethernet connections, including home and work networks, wireless data networks, and the Internet itself, are based on frames sent between computers. WoL is implemented using a specially designed frame called a magic packet, which is commonly sent to all computers in a network, among them the computer to be awakened. The magic packet contains the MAC address of the destination computer. This is an identifying number, built into each network interface controller (NIC), that enables the NIC to be uniquely recognized and addressed on a network. In computers capable of Wake-on-LAN, the NIC(s) listen to incoming packets, even when the rest of the system is powered down. If a magic packet arrives and is addressed to the device's MAC address, the NIC signals the computer's power supply or motherboard to awaken. This has the same effect as pressing the power button.
The magic packet is broadcast on the data link layer to all attached devices on a given network, using the network broadcast address; the IP address (which relates to the internet layer) is not used. Because Wake-on-LAN is built upon broadcast messaging, it can generally only be used within a subnet. Wake-on-LAN can, however, operate across any network in practice, given appropriate configuration and hardware, including remote wake-up across the Internet.
In order for Wake-on-LAN to work, parts of the network interface need to stay on. This consumes a small amount of standby power. To further reduce power consumption, the link speed is usually reduced to the lowest possible speed (e.g. a Gigabit Ethernet NIC maintains only a 10 Mbit/s link). Disabling Wake-on-LAN, when not needed, can slightly reduce power consumption on computers that are switched off but still plugged into a power socket. The power drain becomes a consideration on battery-powered devices such as laptops as this can deplete the battery even when the device is completely shut down.
Magic packet
The magic packet is a frame that is most often sent as a broadcast and that contains anywhere within its payload 6 bytes of all 255 (FF FF FF FF FF FF in hexadecimal), followed by sixteen repetitions of the target computer's 48-bit MAC address, for a total of 102 bytes.
Since the magic packet is only scanned for the string above, and not actually parsed by a full protocol stack, it could be sent as payload of any network- and transport-layer protocol, although it is typically sent as a UDP datagram to port 0 (reserved port number), 7 (Echo Protocol) or 9 (Discard Protocol), or directly over Ethernet using EtherType 0x0842. A connection-oriented transport-layer protocol like TCP is less suited for this task as it requires establishing an active connection before sending user data.
A standard magic packet has the following basic limitations:
- Requires destination computer MAC address (also may require a SecureOn password)
- Does not provide a delivery confirmation
- May not work outside of the local area network
- Requires hardware support for Wake-on-LAN in the destination computer
- Most 802.11 wireless interfaces do not maintain a link in low-power states and cannot receive a magic packet
The Wake-on-LAN implementation is designed to be simple and to be quickly processed by the circuitry present on the network interface controller using minimal power. Because Wake-on-LAN operates below the IP protocol layer, IP addresses and DNS names are meaningless and so the MAC address is required.
Subnet directed broadcasts
A principal limitation of standard broadcast Wake-on-LAN is that broadcast packets are generally not routed. This prevents the technique being used in larger networks or over the Internet. Subnet-directed broadcasts (SDBs) may be used to overcome this limitation. SDB may require changes to the intermediate router configuration. SDBs are treated like unicast network packets until processed by the final (local) router. This router then broadcasts the packet using a layer-2 broadcast. This technique allows a broadcast to be initiated on a remote network but requires all intervening routers to forward the SDB. When preparing a network to forward SDB packets, care must be taken to filter packets so that only desired (e.g. WoL) SDB packets are permitted – otherwise the network may become a participant in DDoS attacks such as the Smurf attack.
Troubleshooting magic packets
Wake-on-LAN can be a difficult technology to implement because it requires appropriate BIOS/UEFI, network interface hardware and, sometimes, operating system and router support to function reliably. In some cases, hardware may wake from one low-power state but not from others. This means that due to hardware issues the computer may be wakeable from its soft off state (S5) but doesn't wake from sleep or hibernation or vice versa.
Starting with Windows Vista, the operating system logs all wake sources in the System event log. The Event Viewer and the powercfg.exe /lastwake
command can retrieve them.
Security considerations
Unauthorized access
Magic packets are sent via the data link or OSI-2 layer, which can be used or abused by anyone on the same LAN, unless the L2 LAN equipment is capable of and configured for filtering such traffic to match site-wide security requirements.
Firewalls may be used to prevent clients among the public WAN from accessing the broadcast addresses of inside LAN segments, or routers may be configured to ignore subnet-directed broadcasts.
Certain NICs support a security feature called "SecureOn". It allows users to store within the NIC a hexadecimal password of 6 bytes. Clients append this password to the magic packet. The NIC wakes the system only if the MAC address and password are correct. This security measure significantly decreases the risk of successful brute force attacks, by increasing the search space by 48 bits (6 bytes), up to 2 combinations if the MAC address is entirely unknown. However, any network eavesdropping will expose the cleartext password.
Abuse of the Wake-on-LAN feature only allows computers to be switched on; it does not in itself bypass password and other forms of security, and is unable to power off the machine once on. However, many client computers attempt booting from a PXE server when powered up by WoL. Therefore, a combination of DHCP and PXE servers on the network can sometimes be used to start a computer with an attacker's boot image, bypassing any security of the installed operating system and granting access to unprotected, local disks over the network.
Interactions with network access control
The use of Wake-on-LAN technology on enterprise networks can sometimes conflict with network access control solutions such as 802.1X MAC-based authentication, which may prevent magic packet delivery if a machine's WoL hardware has not been designed to maintain a live authentication session while in a sleep state.
Security
Some PCs include technology built into the chipset to improve security for Wake-on-LAN. For example, Intel AMT (a component of Intel vPro technology). AMT uses TLS encryption to secure an out-of-band communication tunnel to an AMT-based PC for remote management commands such as Wake-on-LAN.
AMT secures the communication tunnel with Advanced Encryption Standard (AES) 128-bit encryption and RSA keys with modulus lengths of 2,048 bits. Because the encrypted communication is out-of-band, the PC's hardware and firmware receive the magic packet before network traffic reaches the software stack for the operating system (OS). Since the encrypted communication occurs below the OS level, it is less vulnerable to attacks by viruses, worms, and other threats that typically target the OS level.
IT shops using Wake-on-LAN through the Intel AMT implementation can wake an AMT PC over network environments that require TLS-based security, such as IEEE 802.1X, Cisco Self Defending Network (SDN), and Microsoft Network Access Protection (NAP) environments. The Intel implementation also works for wireless networks.
Hardware requirements
Wake-on-LAN support is implemented on the motherboard of a computer and in the network interface controller. It is consequently not dependent on the operating system running on the computer. In order to get Wake-on-LAN to work, enabling this feature on the network interface card or on-board silicon is sometimes required. Details of how to do this depend upon the operating system and the device driver.
Wake-on-LAN usually needs to be enabled in the Power Management section of a PC motherboard's BIOS/UEFI setup utility, although on some systems, such as Apple computers, it is enabled by default. On older systems the BIOS/UEFI setting may be referred to as WoL; on newer systems supporting PCI version 2.2, it may be referred to as PME (Power Management Events, which include WoL). It may also be necessary to configure the computer to reserve standby power for the network card when the system is shut down.
With older motherboards, if the network interface is a plug-in card rather than being integrated into the motherboard there may be a header onboard connected to the network card via a special three-pin cable the card. Systems supporting the PCI 2.2 standard and with a PCI 2.2 compliant network adapter card do not usually require a cable as the required standby power is relayed through the PCI bus. The power supply must meet ATX 2.01 specifications.
Laptops powered by the Intel Centrino processor technology or newer (with explicit BIOS/UEFI support) allow waking up the machine using Wake on Wireless LAN (WoWLAN).
In most modern PCs, ACPI is notified of the waking up and takes control of the power-up. In ACPI, OSPM must record the wake source or the device that is causing the power-up – the device being the soft power switch, the NIC (via Wake-on-LAN), the cover being opened, a temperature change, etc.
The three-pin WoL interface on the motherboard consists of: pin 1, +5V DC (red); pin 2, ground (black); pin 3, wake signal (green or yellow). By supplying the pin-3 wake signal with +5V DC the computer will be triggered to power up provided WoL is enabled in the BIOS/UEFI configuration.
Software requirements
This section contains instructions, advice, or how-to content. Please help rewrite the content so that it is more encyclopedic or move it to Wikiversity, Wikibooks, or Wikivoyage. (May 2021) |
Software that sends a WoL magic packet is referred to in different circles as client or server, which can be a source of confusion. While WoL hardware or firmware is arguably performing the role of a server, Web-based interfaces that act as a gateway through which users can issue WoL packets without downloading a local client often become known as "The Wake On LAN Server" to users. Additionally, software that administers WoL capabilities from the host OS side may be carelessly referred to as a client on occasion; Machines running WoL generally tend to be end-user desktops, and as such, are clients in IT parlance.
Creating and sending the magic packet
Software to send WoL magic packets is available for all modern platforms, including Windows, Macintosh and Linux, plus many smartphones. Examples include: Wake On LAN GUI, LAN Helper, Magic Packet Utility, NetWaker for Windows, Nirsoft WakeMeOnLAN, WakeOnLANx, EMCO WOL, Aquila Tech Wake on LAN, ManageEngine WOL utility, FusionFenix and SolarWinds WOL Tool. There are also web sites that allow a magic packet to be sent online without charge. Example source code for a developer to add Wake-on-LAN to a program is readily available in many computer languages. The following example is in Python:
import socket def wol(luna_mac_address: bytes) -> None: """Send a Wake-on-LAN magic packet to the specified MAC address.""" s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) s.setsockopt(socket.SOL_SOCKET, socket.SO_BROADCAST, 1) magic = b"\xff" * 6 + luna_mac_address * 16 s.sendto(magic, ("<broadcast>", 7)) if __name__ == "__main__": # Pass to wol the MAC address of the Ethernet port of the appliance to wake up wol(b"\x00\x15\xB2\xAA\x5B\x00")
Ensuring the magic packet travels from source to destination
If the sender is on the same subnet or local area network as the computer to be awakened there are generally no issues. When sending over the Internet, and in particular where a network address translation (NAT) router is involved (as typically in most homes), special settings are often necessary.
Further, the WoL protocol operates on a deeper level in the multi-layer networking architecture. To ensure the magic packet gets from source to destination while the destination is sleeping, the ARP binding must typically be set in a NAT router. This allows the router to forward the magic packet to the sleeping computer at a networking layer below typical IP usage. In the NAT router, ARP binding requires a dedicated IP and the MAC address of the destination computer. There are some security implications associated with ARP binding (see ARP spoofing); however, as long as none of the computers connected to the LAN are compromised, an attacker must use a computer that is connected directly to the target LAN (plugged into the LAN via cable, or by breaking through the Wi‑Fi connection security) to gain access to the LAN.
Most home routers are able to send magic packets to a LAN; for example, routers with the DD-WRT, Tomato or PfSense firmware have a built-in Wake-on-LAN client. OpenWrt supports both Linux implementations for WoL.
Responding to the magic packet
Most WoL hardware functionally is typically blocked by default and needs to be enabled using the system BIOS/UEFI setup. Further configuration from the OS is required in some cases, for example via the Device Manager network card properties on Windows operating systems.
Microsoft Windows
Newer versions of Microsoft Windows integrate WoL functionality into the Device Manager. This is available in the Power Management tab of each network device's driver properties. For full support of a device's WoL capabilities (such as the ability to wake from an ACPI S5 power off state), installation of the full driver suite from the network device manufacturer may be necessary, rather than the bare driver provided by Microsoft or the computer manufacturer. In most cases correct BIOS/UEFI configuration is also required for WoL to function.
The ability to wake from a hybrid shutdown state (in which all user sessions are terminated and the system then enters S4 state) (aka Fast Startup, introduced in Windows 8 and Windows Server 2012) or a soft powered-off state (in which all user sessions are terminated and the system then enters S5 state) is not officially supported in Windows. This is because of a change in the OS behavior which causes network adapters to be explicitly not armed for WoL when shutdown to these states occurs, so that those adapters don't consume power in what appears to the user to be a shutdown state, even though the system is just hibernating in a "hybrid shutdown" state. WOL from a non-hybrid hibernation state (in which the system enters S4 state without terminating user sessions) (i.e. when a user explicitly requests hibernation) or a sleep state (S3) is supported. However, some hardware will enable WoL from states that are unsupported by Windows.
Mac hardware (macOS)
Modern Mac hardware supports WoL functionality when the computer is in a sleep state, but it is not possible to wake up a Mac computer from a powered-off state.
Mac OS X Snow Leopard and later support WoL, which is called Wake on Demand. On laptops, the feature is controlled via the macOS System Settings Battery panel, in the Options pop-up window. The Wake for network access item can be set to "Always", "Only on Power Adapter", or "Never"; "Always" enables Wake-on-LAN even when on battery power, but "Only on Power Adapter" enables it only when connected to a power supply. On desktops, the feature is controlled via the System Settings Energy Saver panel. Marking the Wake for network access checkbox enables Wake-on-LAN. It can also be configured through the terminal using the pmset womp (wake on magic packet) command.
Apple's Apple Remote Desktop client management system can be used to send Wake-on-LAN packets, but there are also freeware and shareware macOS applications available. A mechanism called Bonjour Sleep Proxy, provided by Apple AirPort access points and Apple TVs, allows other machines on a LAN to cause a WoL packet to be sent to a host when that machine accesses one of the host's shared resources.
Linux
Wake-on-LAN support may be changed using a subfunction of the ethtool command, for example:
ethtool -s eth0 wol g
Other machine states and LAN wakeup signals
In the early days of Wake-on-LAN the situation was relatively simple: a machine was connected to power but switched off, and it was arranged that a special packet be sent to switch the machine on.
Since then many options have been added and standards agreed upon. A machine can be in seven power states from S0 (fully on) through S5 (powered down but plugged in) and disconnected from power (G3, Mechanical Off), with names such as "sleep", "standby", and "hibernate". In some reduced-power modes the system state is stored in RAM and the machine can wake up very quickly; in others the state is saved to disk and the motherboard powered down, taking at least several seconds to wake up. The machine can be awakened from a reduced-power state by a variety of signals.
The machine's BIOS/UEFI must be set to allow Wake-on-LAN. To allow wakeup from powered-down state S5, wakeup on PME (Power Management Event) is also required. The Intel adapter allows "Wake on Directed Packet", "Wake on Magic Packet", "Wake on Magic Packet from power off state", and "Wake on Link". Wake on Directed Packet is particularly useful as the machine will automatically come out of standby or hibernation when it is referenced, without the user or application needing to explicitly send a magic packet. Unfortunately in many networks waking on directed packet (any packet with the adapter's MAC address or IP address) or on link is likely to cause wakeup immediately after going to a low-power state. Details for any particular motherboard and network adapter are to be found in the relevant manuals; there is no general method. Knowledge of signals on the network may also be needed to prevent spurious wakening.
Unattended operation
For a machine which is normally unattended, precautions need to be taken to make the Wake-on-LAN function as reliable as possible. For a machine procured to work in this way, Wake-on-LAN functionality is an important part of the purchase procedure.
Some machines do not support Wake-on-LAN after they have been disconnected from power (e.g., when power is restored after a power failure). Use of an uninterruptible power supply (UPS) will give protection against a short period without power, although the battery will discharge during a prolonged power-cut.
Waking up without operator presence
If a machine that is not designed to support Wake-on-LAN is left powered down after power failure, it may be possible to set the BIOS/UEFI to start it up automatically on restoration of power, so that it is never left in an unresponsive state. A typical BIOS/UEFI setting is AC back function which may be on, off, or memory. On is the correct setting in this case; memory, which restores the machine to the state it was in when power was lost, may leave a machine which was hibernating in an unwakeable state.
Other problems can affect the ability to start or control the machine remotely: hardware failure of the machine or network, failure of the BIOS/UEFI settings battery (the machine will halt when started before the network connection is made, displaying an error message and requiring a keypress), loss of control of the machine due to software problems (machine hang, termination of remote control or networking software, etc.), and virus infection or hard disk corruption. Therefore, the use of a reliable server-class machine with RAID drives, redundant power supplies, etc., will help to maximize availability. Additionally, a device which can switch the machine off and on again, controlled perhaps by a remote signal, can force a reboot which will clear problems due to misbehaving software.
For a machine not in constant use, energy can be conserved by putting the machine into low-power RAM standby after a short timeout period. If a connection delay of a minute or two is acceptable, the machine can timeout into hibernation, powered off with its state saved to disk.
Wake on Internet
See also: Bonjour Sleep ProxyThe originator of the wakeup signal (magic packet) does not have to be on the same local area network (LAN) as the computer being woken. It can be sent from anywhere using:
- A virtual private network (VPN) – which makes the originator appear to be a member of the LAN.
- The Internet with local broadcasting – some routers permit a packet received from the Internet to be broadcast to the entire LAN; the default TCP or UDP ports preconfigured to relay WoL requests are usually ports 7 (Echo Protocol), 9 (Discard Protocol), or both. This proxy setting must be enabled in the router, and port forwarding rules may need to be configured in its embedded firewall in order to accept magic packets coming from the internet side to these restricted port numbers, and to allow rebroadcasting them on the local network (normally to the same ports and the same TCP or UDP protocol). Such routers may also be configurable to use different port numbers for this proxying service.
- The Internet without local broadcasting – if (as often) the firewall or router at the destination does not permit packets received from the Internet to be broadcast to the local network, Wake-on-Internet may still be achieved by sending the magic packet to any specified port of the destination's Internet address, having previously set the firewall or router to forward packets arriving at that port to the local IP address of the computer being woken. The router may require reservation of the local IP address of the computer being woken in order to forward packets to it when it is not live.
See also
- Alert on LAN
- Alert Standard Format
- Desktop and mobile Architecture for System Hardware
- RTC Alarm
- Wake-on-Ring – Telephone line ring event
- Conventional PCI pinout – Power Management Event (PME#) signal
- Wired for Management
References
- von Nagy, Andrew (8 November 2010). "Wake on Wireless LAN". Revolution Wi-Fi Blog. Retrieved 28 October 2015.
- Fleishman, Glenn (28 August 2009). "Wake on Demand lets Snow Leopard sleep with one eye open". Macworld. Archived from the original on 16 September 2009. Retrieved 15 September 2009.
How it works, Energy Saver preference pane
- ^ "Magic Packet Technology" (PDF) (white paper). AMD. November 1995. 20213, Rev: A Amendment/0. Retrieved 25 December 2024.
- Essick, Kristi (31 October 1996). "IBM, Intel strike deal to lower PC ownership costs". Computerworld. New Zealand. Archived from the original on 2015-12-08. Retrieved 28 October 2015.
- "IBM Announces Universal Management - Industry's Most Comprehensive Tools to Lower Total Cost of Ownership". IBM News Room. 14 April 1998. Archived from the original on 2012-10-12. Retrieved 28 October 2015.
- "Ethernet Tips & Tricks". Less Watts. Archived from the original on November 26, 2007.
- "Understanding Wake On LAN". LANdesk.com. Retrieved 28 October 2015.
- "Plan how to wake up clients in Configuration Manager". Microsoft Docs. 2019-04-23. Retrieved 2020-10-29.
... By default, traditional wake-up packets are transmitted by using UDP port 9...
- "WakeOnLAN". Wireshark wiki. Retrieved 2023-09-27.
- Stevens, W. Richard (2007). "Chapter 12. Broadcasting and Multicasting". TCP/IP Illustrated, Volume 1: The Protocols. Archived from the original on 2014-11-06. Retrieved 28 October 2015.
- Haden, Rhys. "IP Addressing". Data Network Resource. Retrieved 28 October 2015.
- "Magic Packet Technology (White Paper, Publication# 20213, Rev: A Amendment/0)" (PDF). AMD. November 1995. Archived from the original (PDF) on 6 October 2014. Retrieved 28 October 2015.
- "About Subnet-Directed Broadcast Wake-Up Packets for Wake On LAN". Microsoft System Center Configuration Manager. 2007. Archived from the original on 2017-06-30. Retrieved 28 October 2015.
- "Local vs Directed Broadcasts". 5 April 2018. Retrieved 2023-12-07.
- ^ Marshall, Allen. "ACPI In Windows Vista". WinHEC 2006. Microsoft. pp. 23–25.
- wol(1) - Linux man page
- "Understanding 802.1X Authentication with Wake-on-LAN". Cisco Catalyst 6500 Release 12.2SX Software Configuration Guide.
- ^ "Intel Centrino 2 with vPro technology and Intel Core2 processor with vPro technology" (PDF). Intel. Archived from the original (PDF) on 2008-12-06. Retrieved 7 August 2008.
- "Advanced Encryption Standard (AES) Instructions Set". Intel. Archived from the original on 2008-09-24. Retrieved 6 April 2008.
- "Hardening Measures Built into Intel Active Management Technology". Intel. Archived from the original on 2008-03-20. Retrieved 11 June 2008.
- "Xlife » Using Wake-On-LAN WoL/PME to power up your computer remotely". zuavra.net. Archived from the original on 8 March 2007. Retrieved 28 October 2015.
- "Intel® PRO/Wireless 3945ABG Network Connection – Overview". Intel.com. Archived from the original on 2009-02-01. Retrieved 28 October 2015.
- "How to connect the UIRT2 B". skynet.be. Archived from the original on 21 January 2007. Retrieved 28 October 2015.
- p, Jessica (16 August 2016). "Wake On Lan Tools". PCWDLD.com. Retrieved 9 September 2016.
- ^ "'Wake on LAN' (WOL) behavior in Windows 8 and Windows 8.1". Microsoft. 2015. Archived from the original on 1 January 2016. Retrieved 28 October 2015.
- "Wake on LAN (WOL) behavior in Windows 10". 19 February 2024.
- ^ "System Power States". Microsoft. Retrieved 25 December 2024.
- "HP Support document". Hewlett-Packard Support Center. Retrieved 4 January 2018.
- "Share your Mac resources when it's in sleep". Apple Support.
- "Sleep, shut down, log out, or restart a computer with Remote Desktop". Apple Support.
- Brecht, Tim (2003). "Remote Wake-Up: Intel® Network Adapters User Guide". University of Waterloo. Retrieved 28 October 2015.
- "Router Port Forwarding Guides". portforward.com. Archived from the original on 4 November 2015. Retrieved 28 October 2015.
Firmware and booting | |||||||
---|---|---|---|---|---|---|---|
Processes | |||||||
Booting firmware |
| ||||||
Hybrid firmware bootloader | |||||||
Bootloaders |
| ||||||
Partition layouts | |||||||
Partitions | |||||||
Utilities |
| ||||||
Network boot | |||||||
ROM variants | |||||||
Related |