^TipsAnd...

?TableOfContents

Howto

A very good summary, with Links to Clients:

http://www.voehringer.net/wiki/index.php/Howto:Rechneraufwecken_mit_%22Wake_Up_On_Lan%22

With Debian:

apt-get install wakeonlan ethertool

wol script

I use the following script in /usr/local/bin/wol together with a good setup in /etc/hosts and /etc/ethers to wolhostname any host in my local network:

#!/bin/sh                                                                       
# LEG20070319                                                                   
#                                                                               
# Wake on lan by /etc/hosts, /etc/ethers                                        
# (dnsmasq)                                                                     

[ -z "$1" ] && echo Usage: wol hostname && exit 0

IP=$(awk "/$1/{print \$1; exit}" /etc/hosts)
[ -z "$IP" ] && echo Error:wol: $1 not found in /etc/hosts && exit 1

MAC=$(awk "/$IP/{print \$1; exit}" /etc/ethers)
[ -z "$MAC" ] && echo Error:wol: mac not found for $IP in /etc/ethers && exit 1

wakeonlan -i $IP $MAC

/etc/hosts:

ip.ad.re.ss    hostname.domain hostname
...

/etc/ethers:

ma:ca:dd:re:ss:xx    ip.ad.re.ss

Permant Interface configuration

add an up-line to your /etc/network/interface, example:

...
auto eth1
iface eth1 inet static
        address 10.0.0.1
        netmask 255.255.255.0
        broadcast 10.0.0.255
        up ethtool eth1 -s eth1 wol g
...

CategoryTips