WakeOnLAN is the protocol name given to the so-called Magic Packet technology, developed by AMD and Hewlett Packard for remotely waking up a remote host that may have been automatically powered-down because of its power management features. Although power management allows companies and individuals to cut power usage costs, it presents a problem for IT departments especially in being able to quickly and efficiently remotely manage PC's, especially during off-hours operation when those PC's are most likely to be in a suspended or standby state, assuming power management features are enabled.
Ethernet: According to AMD's white paper, WakeOnLAN depends only on Ethernet. However, the paper also indicates that the Magic Packet can reside anywhere within the payload. This means that we would have to search every Ethernet frame for the Magic Packet. In my opinion, doing so would degrade Wireshark performance, especially since most traffic will not contain a Magic Packet. Therefore, the WakeOnLAN dissector has been implemented to dissect only the actual implementations of the Magic Packet. As of this writing, the author is only aware of 2 implementations, one being ether-wake which uses Ethertype 0x0842, which is unfortunately not yet a registered Ethertype, and the other implementation being over UDP.
A physical WakeOnLAN (Magic Packet) will look like this:
0, 4 or 6
The Synchronization Stream is defined as 6 bytes of FFh.
The Target MAC block contains 16 duplications of the IEEEaddress of the target, with no breaks or interruptions.
The Password field is optional, but if present, contains either 4 bytes or 6 bytes. The WakeOnLAN dissector was implemented to dissect the password, if present, according to the command-line format that ether-wake uses, therefore, if a 4-byte password is present, it will be dissected as an IPv4 address and if a 6-byte password is present, it will be dissected as an Ethernet address.
Here is a screenshot of some WakeOnLAN traffic:
The WOL dissector is fully functional for Ethertype 0x0842 and for UDP only. It was first included with Wireshark starting with SVN revision 23371 on November 6, 2007. Expect general availability in the 0.99.7 release of Wireshark.
Currently, there are no preferences for the WOL dissector.
Example capture file
A simple example capture file containing WOL traffic is available on the SampleCaptures page.
A complete list of WOL display filter fields can be found in the display filter reference
- Example: Show only the WOL based traffic:
As WOL is currently implemented, you can use the following capture filter to be reasonably assured of capturing most WOL traffic; however, to guarantee all WOL traffic is captured, at least as far as the dissector is concerned, you should omit the "port 9" qualifier in the capture filter expression:
ether proto 0x0842 or udp port 9
More information about WakeOnLAN can be found on wikipedia.
The AMD white paperis also an excellent source of information.