Lin*_*eak 7 networking cygwin wake-on-lan
我有一个新的 GNU/Linux Debian 9 服务器安装。
这是我得到的ethtool
:
root@web-server:~# ethtool enp2s0
Settings for enp2s0:
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/Half 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/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
Supports Wake-on: pumbg
Wake-on: g
Current message level: 0x00000033 (51)
drv probe ifdown ifup
Link detected: yes
Run Code Online (Sandbox Code Playgroud)
所以,你看到魔包在 ( Wake-on: g
) 上。
我正在从关机状态唤醒这台计算机,如下所示:
./wolcmd 00********** 192.168.0.104 255.255.255.0 7 # I've hidden the MAC address here
Run Code Online (Sandbox Code Playgroud)
从 Windows 10 上的 Cygwin 使用Depicus Wake On Lan 命令行。
我不明白的是,为什么我需要指定IP地址和掩码或端口号?
为什么MAC地址不够用?谁能详细说...
Ign*_*ams 11
WoL 魔法数据包可以发送到 UDP 端口 0、7 或 9(取决于使用的硬件)或作为 0x0842 类型的原始以太网数据包。wolcmd
已选择使用前一种方法,默认为端口 7。
请注意,wolcmd
它确实支持 UDP 广播,这意味着如果您的硬件和网络支持 TCP/IP 广播,您可以指定 255.255.255.255 作为地址和掩码。魔术包只会被它包含的 MAC 地址的机器解释;所有其他人都会忽略它。