IT How Tos

Home

About

Sitemap

Contact

How to make sure a NIC has
Wake on LAN enabled

In order to make sure a NIC has Wake on LAN enabled

Preparation

Firstly capabilities of the NIC needs to be established. This can be achieved using ethtool
Please note in order to obtain the name of the nic can be found using the script getnic
Once the name of the nic is known (in this case the example eth0 shall be used).

The command for this is:

ethtool eth0 | grep -i wake

Please note this command will require sudo or root access.

Output

The expected output would be if it supports and is disabled:

Supports Wake-on: g
Wake-on: d

The expected output would be if it supports and is enabled:

Supports Wake-on: g
Wake-on: g

Command

In order to enable wake on lan, so that machines can be booted up using a magic packet
This can be achieved as follows:

ethtool -s eth0 wol g

Please note this command will require sudo or root access.

Post Check

Once enabled, a check can be made to ensure this:

ethtool eth0 | grep -i wake | grep -iv support | grep g && echo enabled || echo disabled