Friday, October 25, 2013

Wake on Lan in Centos 6

     
Start a computer from a remote machine by Wake on Lan.
[1]     Configuration of the computer you'd like to turn on from remote machine.


 yum -y install ethtool

ethtool -s eth0 wol g
or:
vi /etc/sysconfig/network-scripts/ifcfg-eth0
# add at the last line

ETHTOOL_OPTS="wol g"





check for MAC
ifconfig eth0 | grep HWaddr | awk '{print $5}'

00:22:68:5E:34:06
# take a memo


shutdown -h now


[2]     Operation on the computer at a remore place.

yum -y install net-tools
# ether-wake [MAC address of the computer you'd like to turn on]


ether-wake 00:22:68:5E:34:06
 # send magic packets

***correction

If have more than one interface need to specify it, for example:

ether-wake -i eth0 00:22:68:5E:34:06



found at: http://www.server-world.info/en/note?os=CentOS_6&p=wakeonlan

2 comments:

  1. Doesn't work. I need the correct syntax. I am running CentOS 6.6 and just installed ethtool. It gives errors as follows:

    If I enter ether-wake 00:22:68:5E:34:06 it returns:

    Specify -i .

    If I enter ether-wake -i 00:22:68:5E:34:06 it returns:

    Specify the Ethernet address as 00:11:22:33:44:55.

    Please help!

    ReplyDelete
  2. You have to specify interface if have more than one.

    For example

    ether-wake -i eth0 00:22:68:5E:34:06

    ReplyDelete

Cybermap

Internet Storm Center Infocon Status

Internet Storm Center Infocon Status
Internet Storm Center Infocon Status