Enabling WoL in the NIC

Thursday, 3. December 2015

copied from the Ubuntu Wiki:

Determining whether the NIC supports WoL

First, determine which NIC will be used, and then check whether it supports the Magic Packet™ using

sudo ethtool <NIC>

where <NIC> is the device name of your NIC, e.g. eth0. This command will output some information about your the capabilities of your NIC. If this output contains a line similar to the following:

Supports Wake-on: <letters>

where <letters> contains the letter g, the NIC should support the WoL Magic Packet™ method (for the other letters look at man ethtool).

Enabling WoL in the NIC

To check whether WoL is enabled in the NIC, one could use

sudo ethtool <NIC>

and look for

Wake-on: <letters>

If <letters> contains g and not d, then Magic Packet™ is enabled. However, if <letters> does contain d, WoL needs to be enabled by running the following command:

sudo ethtool -s <NIC> wol g

On most systems, issuing this command is required after each boot. If the system’s networking is configured via ifupdown, then it is easy to add the line up ethtool -s <NIC> wol g below the interface’s configuration stanza in /etc/network/interfaces. For example:

shahar@shahar-backup:~$ cat /etc/network/interfaces

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface

auto lo
iface lo inet loopback
# The primary network interface

auto eth0
iface eth0 inet static
        up ethtool -s eth0 wol g

This will ensure that WoL is enabled in the NIC on each boot. Fore more information see the interfaces manual.

Testing Wake-On-LAN

Test WoL by powering off the system and trying to send it the magic packet using:

Comments are closed.