![如何更改 LAN 喚醒設定?](https://rvso.com/image/1000386/%E5%A6%82%E4%BD%95%E6%9B%B4%E6%94%B9%20LAN%20%E5%96%9A%E9%86%92%E8%A8%AD%E5%AE%9A%EF%BC%9F.png)
我的有線網路連線有問題。
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
這是什麼意思?
如何更改我的 WO 設定? 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