lost and found ( for me ? )

Ubuntu 10.10 : Wake on LAN

[ What’s Wake on LAN ? ]

Wake on LAN enables you to boot a PC by sending a magic packet from a remote PC.

[ Network Topology ]

target machine ( 192.168.11.100 ) ------ magic packet machine ( 192.168.11.14 )

target machine is HP Pavilion Desktop PC e9360jp/CT.
magic packet machine is ONKYO M513A5P.

[ requirement to use Wake on LAN ]

Your target machine’s NIC needs to support Wake on LAN
Wake on LAN is enabled in BIOS on your target machine

There’s no need for magic packet machine to support the above settings.
Magic packet machine just sends a magic packet to boot target machine.

[ BIOS setting : target machine ]

The following settings are disabled by default on my PC.
So I enabled the following settings.

BIOS -> Power -> S5 WOL -> enabled
BIOS -> Detail -> On Board LAN Boot ROM -> enabled

Wake on LAN status “S5” means PC is down , but power is supplied.

[ NIC setting : target machine ]

enable Wake on LAN w/ ethtool

root@hat1:~# ethtool -s eth0 wol g

check the configuration of eth0.
“Wake-on: g” means Wake on LAN is enabled.
root@hat1:~# ethtool eth0 | egrep -i wake-on
Supports Wake-on: pumbg
Wake-on: g

ethtool -s is a temporary setting.
If you reboot OS , Wake on LAN will be disabled.
So I added the following line to enable Wake on LAN permanently in /etc/rc.local file.

root@hat1:~# egrep ethtool /etc/rc.local
/sbin/ethtool -s eth0 wol g


[ magic packet machine ]

install wakeonlan tool which enables you to send a magic packet to a target machine.
# apt-get install wakeonlan

[ boot a target machine by sending a magic packet from magic packet machine ]

check a target machine’s MAC address n’ shutdown the target machine.

send a magic packet to the target machine from a magic packet machine.
This packet will change WOL status of a target machine from S5 ( turn off ) to S0 ( turn on )
# wakeonlan -i 192.168.11.255 zz:zz:zz:zz:zz:zz
Sending magic packet to 192.168.11.255:9 with zz:zz:zz:zz:zz:zz

wakeonlan -i [broadcast IP address] [target machine’s MAC address]

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.