Wake on lan is a system which receives a special packet from the network to turn on a machine. Let's begin installing it on the server.
# apt-get install wakeonlan |
It is prettty easy, first you need to be sure that it is enabled in your bios, since every bios is different, it is your work to find how to do this.
Now the system must have enable WOL as well. Install ethtool on the client
# apt-get install ethtool |
and run
if we see the line
WOL is supported by your ethernet card, but for new machines this is alwatys the case. Now if you see the line
WOL is disable. Enable it with
Since WOL uses the MAC address to wake a machine you should create the file /etc/ethers with the pair MAC/hostname in the server. Since I have already done something similar for /etc/hosts I used this line to get that done
# touch /etc/ethers && for i in $(seq 0 1 12); do arp wn$i | grep | ether | awk '{print $3 " " $1}' >> /etc/ethers |
and now for a turned off machine you can run
It is amazing that a packet will enable a system at remote place. The authentication level is very high for this operation to svae it from misuse.
ReplyDeleteThanks
Silvester Norman
Change Mac Address