[ Bottom of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]

Commands Reference, Volume 6, v - z

wol command

Purpose

Wakes up one or more hosts that are connected to a network in suspend mode by sending a Magic Packet.

Syntax

To send a Magic Packet to a subnet-directed broadcast address:

wol { [ -m MACAddress [ [ -h Host -s SubnetMask ] | -i Interface ] | -f File } [ -v ]

To send a Magic Packet to a multicast address:

wol { -m MACAddress -M MulticastAddress [ -p Port ] [ -i Interface ] | -f File} [ -v ]

Description

The wol command wakes up one or more hosts that are connected to a network in suspend mode by sending a Magic Packet to the specified address or addresses on the specified subnet.

If the user doesn't specify either the -h, nor -s flag, the wol manager will broadcast the Magic Packet as follows:

The file specified with -f File contains the list of hosts which need to be awakened. This file consists of one or more lines, each line containing the following information in this format:

MacAddress; Hostname/IPaddress; SubnetMask; Multicast; Port; Interface

For example, the file might look like this:

00:20:35:7a:7:89a;        9.41.86.19;      255.255.255.0  ; ; ;
00:04:ac:17:c0:9f ;        obiwan.aoot.austin.ibm.com;       255.255.255. 224; ; ;
00:07:be:4a:2:394; ; ; ; ; en0
00:06:38:6b:7e:8f ;         ; ; 234.5.6.7;   12345 ;

A line starting with a "#" character is a comment and is ignored. Each line contains 6 tokens separated by ";" character. The MAC address is mandatory. The other tokens are optional, but the ";" character must be used to separate unused tokens.

Flags

-i Interface Specifies the interface to use on the host where the wol command is being run
-f File Specifies the name of a file containing a group list. This allows the user to wake a specified group of hosts.
-h Host Specifies a host to wake, either as a hostname or as an IPv4 address in dot string representation (for example, 10.0.0.3).
-m MACAddress Specifies the a 48 bits MAC address of the host in hex representation (for example, 00:20:35:7a:78:9a).
-M MulticastAddress Specifies an IPv4 multicast address.
-p Port Specifies the port to use on the multicast machine.
-s SubnetMask Specifies an IPv4 subnet mask in dot string representation (for example, 255.255.255.0).
-v Specifies verbose mode.

Exit Status

0 The command completed successfully.
>0 An error occurred.

Location

/usr/sbin/wol

[ Top of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]