Next Previous Contents

2. Wake on LAN

2.1 What is it?

The ability to switch on remote computers through special network packets. This only works with network cards and motherboards that are Wake on LAN compliant.

2.2 How does it work?

WOL is based on the following principle:

When the PC shuts down, the NIC still gets power, and keeps listening on the network for a 'magic' packet to arrive. This packet must contain a certain byte-sequence, but can be encapsulated in any kind of packet (IPX, IP, anything). Take a look at the code for the magic sequence.

This program uses UDP for sending the packet. The complete UDP packet, sent over an ethernet interface, looks something like this:

[ethernet header][IP header][UDP header][Magic sequence][CRCS]

The only goal of the script is to send this packet over the network. It expects no returning data, since the NIC only listens, and does not reply anything.

For a more detailed description of the protocol, see the AMD white paper.

2.3 Hardware requirements

Green PC, motherboard BIOS support, network cards, PCI 2.2, Operating system support (Windows 95 - DELL's document -, Windows 98, Windows 2000)


Most modern ATX motherboards should have a 3-pin Wake-on-LAN connector near the PCI slots and should included BIOS support for Wake-on-LAN power up. If you have an Award BIOS check the Power Management Setup for this option.

Network cards

The network card should also include a 3-pin Wake-on-LAN connector. One of the network cards that includes this connector is the Intel Pro/100+ (chipset 82559)

2.4 Wake-up frame

A Wake-up frame is a special data packet containing the Ethernet address of the remote network card. Somewhere in this frame should exist a byte stream (magic sequence) composed by, at the least, 16 times the repetition of the Ethernet address and preceded by a synchronization stream of 6 bytes of FFh.

Magic sequence

If the Ethernet address of a target computer is 01:02:03:04:05:06 (6 bytes), then the LAN controller of that machine should be looking for the following sequence

inside the frame.

2.5 Ethernet addresses

An Ethernet Address ia a six octets (48 bits) number that uniquelly identifies every network interface card (NIC). The first three octects (24 bits) are known as the Organizationally Unique Identifier (OUI) and identifies its manufacturer.

The IEEE organization maintains a list of the OUIs in the following web page: IEEE OUI and Company_id Assignments.


        Ethernet: the Definitive Guide
        Charles E. Spurgeon
Homepage: Author homepage.
        IEEE 802.3 Carrier Sense Multiple Access with Collision Detection (CSMA/CD)
        Access Method and Physical Layer Specification
        Institute of Electrical and Electronics Engineers
Since May 14, 2001 the IEEE Local and Metropolitan Area Network (802) standards can be downloaded from the IEEE web site (

How to obtain Ethernet addresses

Local NICs:

Other methods:


Windows NT

2.6 TCP/IP broadcast addresses


        Internetworking with TCP/IP
        Volume I: Principles, protocols, and architecture (third edition)
        Douglas E. Comer
        Prentice Hall
There is a description of Internet addresses in chapter 4 of this book (sections 4.5, 4.6 e 4.11).

Next Previous Contents