Scyld

Using Wake-On-LAN with Linux

Summary:

Instruction to use Wake-On-LAN capabilities with the Linux operating system.

Background

Wake-On-LAN is the generic name for the AMD "Magic Packet" technology. It's very similar to the PCMCIA modem "wake on ring" signal line. The basic idea is that the network adapter has a very-low-power mode to monitor the network for special packet data that will wake up the machine.

The Scyld Wake-up program

Waking up the target machine requires knowing the station address of the target adapter. If a machine has multiple network interfaces, you must identify the one with the WOL cable attached and use that interface's station address.

Download the wake-up program, ether-wake.c from ftp://ftp.scyld.com/pub/diag/ether-wake.c. Compile it as suggested by the compile-command at the bottom of the file.

After loading the driver on the target machine, record the Ethernet station address in the detection message. Shut the target machine down and do a soft-power-off. Do not switch power completely off with the power supply switch, or the card will lose its WOL configuration.

From the control machine run something like

[root@vaio log]# ~becker/diag/ether-wake 00:50:04:7c:6e:8c with the correct station address for your card. This will turn on the target machine.

Supported Adapters

This feature is incorporated in most recent network chips. The list here is only a sample.

WOL was on a special version of the Intel i82557 (EEPro100B), and is now standard on the i82558 (EEPro100+) and i82559. See http://developer.intel.com/design/network/datashts/82558pb.htm.

Intel motherboards with on-board 100base* ethernet use the i82557 chip, but most have the updated firmware and a seperate Wake-On-LAN chip. See
http://developer.intel.com/design/motherbd/dk/index.htm
http://developer.intel.com/design/motherbd/nx/index.htm.

Other chips with this feature are the AMD Fast-PCnet (rare), later versions of the Intel/Digital 21143, the 3Com Cyclone and Tornado (starting Jan or Feb 1998 as the 3c905-revB), and the Symbios chip (but not the nearly-identical gigabit Yellowfin chip).

Complete support requires a low-power transceiver, compatible motherboard, and the right ATX power supply. An ATX power supply provides a low-current stand-by 5V source even when powered off. For wake-on-LAN to work the stand-by power should be enough to power some of the motherboard logic, and the receiver and the address-matching section of the network adapter. Neither power supplied nor power needed is well specified, so not all combinations of components will work.

Although a few adapters and motherboards can source stand-by power through previously unassigned pins on the PCI connector, most systems need a three wire "WOL" cable to connect the stand-by power and wake-up signal from the motherboard to the network adapter.

Options for the 'ether-wake' program

The ether-wake program accepts the following options:
-b Send wake-up packet to the broadcast address.
-D Increase the debug level.
-i ifname Use interface ifname instead of the default "eth0".
-p password Append the four or six byte password PW to the packet. (See password section.)
-v Increase the verbosity level. This is useful for examining the actual packet generated.
-V Show the program version string.

WOL Password

A few chip types have an optional WOL password that must be appended in order for the WOL packet to be accepted. This password is either four or six bytes long. A password may be specified in hex (Ethernet address) or dotted decimal (Internet address) format. For example

-p 00:22:44:66:88:aa -p 192.168.1.1
Scyld Computing Corporation
Author:Donald Becker, becker@scyld.com