A    Wake-On-LAN Utility

The wake-on-LAN (wol) utility allows you to send a network packet from another system on the same subnet to power on a target system where this feature is supported.

This utility and its reference page are included in Version 5.1B. For Version 5.1A, the wol(8) utility is included in the NHD-6 kit at ./520/usr/sbin/wol, and multiple versions of the reference page are included in the ./DOC/man8 directory.

Name

wol — Send network packet over subnet to turn on target system power

Synopsis

/usr/sbin/wol [nw_interface] hw_address

Options

nw_interface

Specifies the network interface to use in making the connection to the target system, for example: tu1. This argument is optional.

Operands

hw_address

Specifies the hardware network address of the target system, for example: 0A-1B-2C-3D-5E-6F. This argument is mandatory.

Description

The wol utility (wake-on-LAN) generates and transmits a network packet to power on a remote system on the same subnet. Before you can use the wol utility, you must enable the remote system management wake-on-LAN feature on the target system.

You must specify the target system's hardware address. You may optionally specify the network interface to use in making the connection to the target system. If no network interface is specified, the wol utility locates the first configured network interface and prompts you for confirmation.

To enable the wake-on-LAN feature, set the target system's wol_enable console variable to on and reset the system so that the network controller can read the new state. Use one of the following methods to enable this feature on the target system:

Use one of the following methods to disable the wake-on-LAN feature:

Note

You must reset the target system for the new setting to take effect.

Restrictions

You must be logged in as root or have superuser privileges to use the wol utility.

The target system must be on the same subnet as the system where you invoke the wol utility.

You cannot turn off the power on a target system with the wol utility.

The wake-on-LAN feature is only available on specific platforms. On platforms that support this feature, additional restrictions may apply. For example, the wake-on-LAN feature may be supported on specific network interface ports only. See your hardware documentation for additional information.

Exit Status

0 (Zero)

Success.

>0

An error occurred.

Errors

Error detecting default interface

Explanation:

The wol utility cannot detect a default network interface automatically.

User Action:

Patterns must be specified as hex digits
The Magic Packet address must be specified as 00-11-22-33-44-55

Explanation:

The hardware network address entered was in the wrong format. This argument must be in the following format: xx-xx-xx-xx-xx-xx, where x is a hexadecimal character (0 through 9 and A through F, inclusive).

User Action:

Specify the hardware network address correctly.

wand: socket: Address family not supported by protocol family
 

Explanation:

The system where you entered the wol command is not on the same subnet as the target system.

User Action:

Enter the wol command on a system that is on the same subnet as the target system.

Examples

  1. The following example shows a simple use of the wol utility, where the host system detects the first configured network interface and prompts for confirmation:

    # /usr/sbin/wol 00-02-56-00-03-29
    No sending device specified, using tu0, continue? (y/n) y
    

  2. The following example shows the same use of the wol utility, where the user declines confirmation of the selected network interface:

    # /usr/sbin/wol 00-02-56-00-03-29
    No sending device specified, using tu0, continue? (y/n) n
    Aborting...
    

  3. The following example explicitly specifies a network interface:

    # /usr/sbin/wol tu1 00-02-56-00-03-29
    

Environment Variables

wol_enable

Enables or disables the wake-on-LAN feature on the target system. Valid values are on and off.

Note

This is a system console variable, not a UNIX environment variable. The Description section tells you how to enable the wake-on-LAN feature on the target system. You must enable this feature before you use the wol utility.

Files

/usr/sbin/wol

Wake-on-LAN utility.

See Also

Commands: consvar(8), halt(8), reboot(8), shutdown(8)

System Administration