Gentoo MythTV

18. 08. 08

quick wake-on-lan howto

Filed under: configuration — Tags: , , , — niko86 @ 22:22

Quick breakdown:

Required Software:
ether-wake

Useful:
arp (part of net-tools)

install:

bunker ~ # emerge -av net-tools

look@comment (ether-wake is now part of net-misc/ethercard-diag)

The Syntax is:
usage: ether-wake [-i ] [-p aa:bb:cc:dd[:ee:ff]]
 00:11:22:33:44:55

so you need the mac adress of the host you want to wake-up, which is not very handy since i assume you do not want to remember every MAC Adress.

ether-wake can however read from the file /etc/ethers
this file stores MAC/Name pairs, so you can ether-wake by name.

this is how you create this file:


#create MAC/Name pairs for every host on your network \
that is currently in the arp cache
bunker ~ # arp | awk '{print $3,$1}' >> /etc/ethers

after you have done this you are almost there.
some machines do not even need to be setup to wake them up.
you should however look for some WOL option in the BIOS of the machine you want to wakeup, commonly found under “Power Management”.

As far as I know there are no additional Kernel Paramters/Modules needed (it flawlessly worked for me on 5 machines without even looking for BIOS otions.)
It could not hurt however if you take a peak.

With Windows it is another story, boot the machine up, go to your device management panel, select your network adapter, if there is an “advanced” tab you can look for some wake-on-lan options there.

waking up a machine by its name works like this:



bunker ~ # ether-wake machinename

if machinename is not specified in /etc/ethers ether-wake will complain.
if you got multiple network interfaces in your machine (the one you are using to wake-up the others), you have to specify the interface to use:


bunker ~ # ether-wake -i ethX machinename

if something does not work, it may well be, that it will work if you set everything back to default, as i said, it worked for me with 2 windows and 3 linux machines without touching any bios or software options.

ether-wake is capable of HEX Style passwords which are recognized by the clients to prevent abuse, but since i do only use this at home i did not bother to much )

if you want to use ether-wake as non-root user you may have to set the suid-root bit on the application because it requieres you to be root to execute.


bunker ~ # chmod u+s /usr/sbin/ether-wake

Create a free website or blog at WordPress.com.