我尝试让局域网唤醒与我的本地服务器(IP 地址:192.168.0.2,发行版 Ubuntu 12.04.3 LTS)配合使用,但没有成功,该服务器配有 Realtek RTL8101E/RTL8102E 以太网卡。
发送 WOL 的电脑是 Macbook Pro,它们连接到同一个网络。但服务器无法启动。
以下是我目前所做的:
name@serverName ~ $ cat /proc/acpi/wakeup
Device S-state Status Sysfs node
HDEF S3 *disabled pci:0000:00:1b.0
PXSX S3 *disabled
PXSX S0 *enabled pci:0000:04:00.0
PXSX S0 *disabled
USB1 S3 *enabled pci:0000:00:1d.0
USB2 S3 *enabled pci:0000:00:1d.1
USB3 S3 *enabled pci:0000:00:1d.2
USB5 S3 *enabled pci:0000:00:1a.1
EHC1 S3 *enabled pci:0000:00:1d.7
EHC2 S3 *enabled pci:0000:00:1a.7
name@serverName ~ $ lspci
------
04:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8101E/RTL8102E PCI Express Fast Ethernet controller (rev 01)
------
name@serverName ~ $ sudo ethtool eth0
Settings for eth0:
Supported ports: [ TP MII ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
Supported pause frame use: No
Supports auto-negotiation: Yes
Advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
Advertised pause frame use: Symmetric Receive-only
Advertised auto-negotiation: Yes
Link partner advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
Link partner advertised pause frame use: Symmetric Receive-only
Link partner advertised auto-negotiation: Yes
Speed: 100Mb/s
Duplex: Full
Port: MII
PHYAD: 0
Transceiver: internal
Auto-negotiation: on
Supports Wake-on: pumbg
Wake-on: g
Current message level: 0x00000033 (51)
drv probe ifdown ifup
Link detected: yes
我正在使用以下命令调用 WOL:
name@serverName ~ $ wakeonlan xx:xx:xx:xx:xx`
Sending magic packet to 255.255.255.255:9 with xx:xx:xx:xx:xx
我已成功激活计算机 BIOS 中的 WOL 选项。有什么想法吗?
答案1
要通过 WOL 启动机器,网络接口需要在关机后保持活动状态。
类型
root@host:~# cat /etc/init.d/halt | grep ^NETDOWN
NETDOWN=yes
控制是否保持开启。要保持网络接口开启,请将脚本NETDOWN
中的变量设置/etc/init.d/halt
为:
NETDOWN=no