打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
唤醒关闭的机器

Enable WOL on Centos 5.5 — (Wake up on Lan) November 20, 2010

Posted by tournasdimitrios1 in Linux.
trackback

Quite simply, WOL is a technology that allows a computer that is turned off to be remotely turned on.  While there are a number of different protocols for implementing WOL, the most popular is the ‘Magic Packet’ tm technique.WOL-enabled computers must have a network adapter installed in them that supports one or more remote wake up protocols.  The general technique used by WOL-enabled network cards is that even when powered off, the computer’s network card still receives a small amount of power to enable the card to ‘listen’ for a special signal on the network to wake up.  At that point, it instructs the computer to turn itself on.  The key to implement WOL is to know the remote computer’s (the one to be awakened) MAC address.  The MAC address is used since the computer is OFF, and any tcp, registry, etc. services are not available.

To enable Wake up On Lan within Centos 5.5 you will need ethtool and a WOL client. If ethtool is not already installed on your Centos system use  yum install ethtool and  yum install net-tools (WOL client) .

This will put the ethtool program into /usr/sbin . If you are using a windows client to turn on the Centos machine you can use WOL client.

If you are waking the Centos box from another linux machine you could use a command line tool e.g.

/usr/sbin/ether-wake MAC-Address

For both wake up tools the MAC address of the Centos box will be needed, this can be obtained by issuing

ifconfig eth0 |grep HW | awk ‘{print $5}’

By default Centos does not enable WOL, it is necessary to modify the interface shutdown script to achieve this.

Modify the file /etc/sysconfig/network-scripts/ifup-post , add the following at the end of the file BEFORE the exit 0  /usr/sbib/ethtool -s eth0 wol g

This configuration will force eth0 to enable wol during the shutdown process instead of powering the interface off completely.

You should now be able to power down the Centos using                        shutdown -h now and restart it using one of your WOL client tools.

A lot of packages supports the WOL client functionality , my previous demonstration uses the ” ether-wake “  command (net-tools rpm package ) . An alternative client is the ” wakeonlan ” , the rpm package that contains this command is :  wakeonlan-0.41-0.fdr.1.noarch.rpm . You have to download this package manually vs .

#  wget  http://gsd.di.uminho.pt/jpo/software/wakeonlan/downloads/wakeonlan-0.41-0.fdr.1.noarch.rpm

#   rpm  -Uvh wakeonlan-0.41-0.fdr.1.noarch.rpm

#   wakeonlan  **:**:**:**:**:** (MAC-address)

本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
【热】打开小程序,算一算2024你的财运
HOW-TO:Set up Wake-On-Lan (Ubuntu)
 centos及ubuntu网络唤醒(使用命令开机)
云计算学习路线教程大纲课件:CentOS7修改网卡为eth0
解决centos无法安装网卡问题
手机微信实现网络唤醒电脑(WOL),远程开机,WakeOnLan – 全栈笔记
遠端啟動電腦開機(Magic Packet )
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服