2009年4月10日 星期五

Static ARP Entry and Wake on Lan on Arch Linux

1. install wol package in community repository

pacman -S wol

2. wol works only if the target machine is in the arp table. so if not, manually add an entry to the table

arp -s HOSTNAME MACADDRESS

hostname must be in /etc/hosts

3. to load permanent arp entry at boot time, create /etc/ethers then add the command into /etc/rc.local

vi /etc/ethers
--

MACADDRESS HOSTNAME


vi /etc/rc.local
--

arp -f

-f: if no filename is specified, /etc/ethers is used as default

4. wake up some machine

wol -h HOSTNAME MACADDRESS

沒有留言: