我的有线互联网连接有问题。
ifconfig
enp3s0 Link encap:Ethernet HWaddr 70:4d:7b:31:40:67
inet addr:10.129.45.123 Bcast:10.129.63.255 Mask:255.255.224.0
inet6 addr: fe80::ae56:1e47:3b4f:9147/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:94 errors:0 dropped:0 overruns:0 frame:0
TX packets:42 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:6204 (6.2 KB) TX bytes:6856 (6.8 KB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:628 errors:0 dropped:0 overruns:0 frame:0
TX packets:628 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1
RX bytes:48976 (48.9 KB) TX bytes:48976 (48.9 KB)
以下是我使用 ethtool 得到的结果
ethtool enp3s0
Settings for enp3s0:
Supported ports: [ TP MII ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Half 1000baseT/Full
Supported pause frame use: No
Supports auto-negotiation: Yes
Advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/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
1000baseT/Half 1000baseT/Full
Link partner advertised pause frame use: Symmetric Receive-only
Link partner advertised auto-negotiation: Yes
Speed: 1000Mb/s
Duplex: Full
Port: MII
PHYAD: 0
Transceiver: internal
Auto-negotiation: on
Cannot get wake-on-lan settings: Operation not permitted
Current message level: 0x00000033 (51)
drv probe ifdown ifup
Link detected: yes
使用 sudo,只需更改两行
Supports Wake-on: pumbg
Wake-on: g
这是什么意思?
如何更改我的 wol 设置? 启动 Ubuntu 后 WOL 停止工作
我应该从上面的链接更改脚本吗?
答案1
要使用 WoL 功能,您首先需要确保它在您的 BIOS/网卡中已启用。
如果已启用,您可以使用来ethtool
检查其当前设置。
如果您缺少 ethtool,您可以通过以下方式安装它sudo apt install ethtool
。
一旦可用,您可以通过以下命令检查您的设置:
sudo ethtool [yourInterface]
例如sudo ethtool enp0s3
寻找这条线Wake-on: d
如果值为“d”,您可以使用以下命令启用它:
sudo ethtool -s [yourInterface] wol g
例如sudo ethtool -s enp0s3 wol g
如果值为“g”,您可以通过以下方式禁用它:
sudo ethtool -s [yourInterface] wol d
例如sudo ethtool -s enp0s3 wol d