顯示具有 wol 標籤的文章。 顯示所有文章
顯示具有 wol 標籤的文章。 顯示所有文章

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

2008年6月26日 星期四

Wake up computer on Lan from Ubuntu

1. ethtool is a net driver diagnostic and tuning tool for linux. using it to check the network card settings

sudo ethtool eth0
--
.
Wake-on: d
.

2. change wake-on setting to g (Wake on MagicPacket)

sudo ethtool -s eth0 wol g

3. install etherwake, a tool to send magic Wake-on-LAN packets

sudo apt-get install etherwake

4. create a file which lists mac and hostname/ip pairs

sudo vi /etc/ethers
--
MAC_ADD Hostname
MAC_ADD IP_ADD

5. send wol to your target host

sudo etherwake MAC_ADD
# or hostname you have specifed