-
-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
总结几点Wake On Lan(WOL)失败的原因 #124
Comments
Linux 开启 Wake On Lan
使用 root@pve:~# ifconfig
enp8s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
ether 2c:60:0c:1c:6b:43 txqueuelen 1000 (Ethernet)
RX packets 30406 bytes 16108731 (15.3 MiB)
RX errors 0 dropped 1 overruns 0 frame 0
TX packets 25080 bytes 3292961 (3.1 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 可以看到我的网卡名称为 enp8s0,然后查看网卡的 WOL 配置: root@pve:~# ethtool enp8s0
Settings for enp8s0:
Supported ports: [ TP MII ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Supported pause frame use: Symmetric Receive-only
Supports auto-negotiation: Yes
Supported FEC modes: Not reported
Advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Advertised pause frame use: Symmetric Receive-only
Advertised auto-negotiation: Yes
Advertised FEC modes: Not reported
Link partner advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Link partner advertised pause frame use: Symmetric
Link partner advertised auto-negotiation: Yes
Link partner advertised FEC modes: Not reported
Speed: 1000Mb/s
Duplex: Full
Port: MII
PHYAD: 0
Transceiver: internal
Auto-negotiation: on
Supports Wake-on: pumbg
Wake-on: d
Current message level: 0x00000033 (51)
drv probe ifdown ifup
Link detected: yes 注意这里的输出: root@pve:~# ethtool -s enp8s0 wol g 但是上面的命令有个问题,它只能临时开启 wol,重启后就被重置为 root@pve:~# cat << EOF>/etc/systemd/system/wol.service
[Unit]
Description=Enable Wake On Lan
[Service]
Type=oneshot
ExecStart = /sbin/ethtool -s enp8s0 wol g
[Install]
WantedBy=basic.target
EOF
root@pve:~# systemctl daemon-reload
root@pve:~# systemctl enable wol.service
root@pve:~# systemctl start wol.service 下面就重启验证吧,我这是正常的。 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
正文
在我想使用Wake On Lan(后文皆用WOL代替)这项技术远程开机时,总是失败,在查阅各种资料后成功使用上了WOL,下面总结几点导致失败的原因。
以上几点都是基于我的几台设备总结的,不排除有误,其中3、4、5三点浪费了我极久的时间调查。
参考来源
[1] ACPI电源管理介绍:https://www.cnblogs.com/AlwaysOnLines/p/4548097.html
[2] 系统层面的微软解答:https://answers.microsoft.com/en-us/windows/forum/windows_10-power/windows-10-wake-on-lan-not-working-from-shutdown/ba6ae540-b602-42f3-b5bb-afe95fe6661c
The text was updated successfully, but these errors were encountered: