Chances are you are sending to an ip address which is not the broadcast address for the local network. What happens is that when you turn your machine off it loses the ip address but your switch/hub and other machines will keep this information in it's arp cache. When this cache expires you will not be able to WoL unless you use the broadcast address.
Note: the question is a 4+ year old cross post from here. Not sure why it gets a bounty after more than 4 years, but probably it received a wol package ;-)
The ethtool manual says:
wol p|u|m|b|a|g|s|d...
Set Wake-on-LAN options. Not all devices support this. The
argument to this option is a string of characters specifying
which options to enable.
p Wake on phy activity
u Wake on unicast messages
m Wake on multicast messages
b Wake on broadcast messages
a Wake on ARP
g Wake on MagicPacket(tm)
s Enable SecureOn(tm) password for MagicPacket(tm)
d Disable (wake on nothing). This option clears all previous
options.
The PHY activity refers to the PHY chip, that handles communication on the physical layer of the OSI model. In laymans terms: any package directly send to this networking device should wake the machine up.
The following conditions should be met before wake on PHY works:
- your networking device supports this and your networking driver supports this. I'm not sure if ethtool is checking this extensively before setting the parameter. Check your manual/spec's to see if this specific feature is supported.
- your ethernet card is still on after shutdown (led lights should be on). If this isn't the case, make sure that your OS isn't shutting down the card (in most Linux distro's put
NETDOWN=no
in /etc/default/halt
).
- wol settings are preserved after sleep/shutdown.
- wol is enabled in your BIOS settings.
Also note that the default arp timeout is 30 seconds (also see this SU post). After that, the ip address of your target machine will be forgotten by the machine from where you are sending any physical package. Make sure you set a static arp address on the machine from where you are sending the package.
Now any directed request (ping, http, ssh, a wol package, ...) should bring your machine up.
Best Answer
“Wake On LAN” makes the system wake on the “magic packet.”
The “Wake on pattern match” option instead checks for packets that matches the operating-system-specified patterns; for example, an ARP request for the computer’s address, or a TCP connection attempt.
The default patterns on a Windows 7 system are:
There’s no ARP in the list since the device is expected to support “ARP Offload”; that is, reply to ARP requests with OS-set address by itself.