- A+
1.确定服务器是否支持远程开机
- [root@ncapp ~]# ethtool eth0
- Settings for eth0:
- Supported ports: [ TP ]
- Supported link modes: 10baseT/Half 10baseT/Full
- 100baseT/Half 100baseT/Full
- 1000baseT/Full
- Supported pause frame use: Symmetric
- Supports auto-negotiation: Yes
- Advertised link modes: 10baseT/Half 10baseT/Full
- 100baseT/Half 100baseT/Full
- 1000baseT/Full
- Advertised pause frame use: Symmetric
- Advertised auto-negotiation: Yes
- Speed: 1000Mb/s
- Duplex: Full
- Port: Twisted Pair
- PHYAD: 1
- Transceiver: internal
- Auto-negotiation: on
- MDI-X: Unknown
- Supports Wake-on: pumbg
- Wake-on: g
- Current message level: 0x00000007 (7)
- drv probe link
- Link detected: yes
- [root@ncapp ~]#
可以看到,ethtool把网卡的信息全部列出,我们只关心其中的这两项:
- Supports Wake-on: pumbg
- Wake-on: d
如果 wake-on 一项值为 d,表示禁用wake on lan
值为 g,表示启用 wake on lan
因为此机器禁用了 wake on lan,所以用下面的命令来启用它:
[root@localhost lhd]# ethtool -s eth0 wol g
再用 ethtool命令进行查看,会发现:
Wake-on: g
2.得到目标主机的IP地址和MAC地址
- [root@ncapp ~]# ifconfig
- eth0 Link encap:Ethernet HWaddr 6C:0B:84:70:49:F8
- inet addr:192.168.250.250 Bcast:192.168.250.255 Mask:255.255.255.0
- inet6 addr: fe80::6e0b:84ff:fe70:49f8/64 Scope:Link
- UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
- RX packets:343630181 errors:0 dropped:0 overruns:0 frame:0
- TX packets:419011268 errors:0 dropped:0 overruns:0 carrier:0
- collisions:0 txqueuelen:1000
- RX bytes:161818083144 (150.7 GiB) TX bytes:166360056862 (154.9 GiB)
- Memory:e6200000-e6240000
- eth1 Link encap:Ethernet HWaddr 6C:0B:84:70:49:F9
- UP BROADCAST MULTICAST MTU:1500 Metric:1
- RX packets:0 errors:0 dropped:0 overruns:0 frame:0
- TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
- collisions:0 txqueuelen:1000
- RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
- Memory:e6240000-e6280000
- eth2 Link encap:Ethernet HWaddr 6C:0B:84:70:49:FA
- UP BROADCAST MULTICAST MTU:1500 Metric:1
- RX packets:0 errors:0 dropped:0 overruns:0 frame:0
- TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
- collisions:0 txqueuelen:1000
- RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
- Memory:e6280000-e62c0000
- eth3 Link encap:Ethernet HWaddr 6C:0B:84:70:49:FB
- UP BROADCAST MULTICAST MTU:1500 Metric:1
- RX packets:0 errors:0 dropped:0 overruns:0 frame:0
- TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
- collisions:0 txqueuelen:1000
- RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
- Memory:e62c0000-e6300000
- 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:16436 Metric:1
- RX packets:83604072 errors:0 dropped:0 overruns:0 frame:0
- TX packets:83604072 errors:0 dropped:0 overruns:0 carrier:0
- collisions:0 txqueuelen:0
- RX bytes:50702025521 (47.2 GiB) TX bytes:50702025521 (47.2 GiB)
- usb0 Link encap:Ethernet HWaddr 02:E0:EC:2D:8C:73
- inet6 addr: fe80::e0:ecff:fe2d:8c73/64 Scope:Link
- UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
- RX packets:1286873 errors:0 dropped:0 overruns:0 frame:0
- TX packets:3 errors:0 dropped:0 overruns:0 carrier:0
- collisions:0 txqueuelen:1000
- RX bytes:36286166 (34.6 MiB) TX bytes:258 (258.0 b)
- virbr0 Link encap:Ethernet HWaddr 52:54:00:C0:67:FB
- inet addr:192.168.122.1 Bcast:192.168.122.255 Mask:255.255.255.0
- UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
- RX packets:7 errors:0 dropped:0 overruns:0 frame:0
- TX packets:10 errors:0 dropped:0 overruns:0 carrier:0
- collisions:0 txqueuelen:0
- RX bytes:2161 (2.1 KiB) TX bytes:2351 (2.2 KiB)
- [root@ncapp ~]#
3.准备好远程开机软件
在局域网中另一台电脑上安装远程开机软件
从以下网站下载https://www.depicus.com/wake-on-lan/wake-on-lan-cmd
Wolcmd.zip文件
解压到指定的目录下,比如,本文指定的C盘根目录。

4.远程开机

以上是帮助
如要开192.168.150.245这台机器,命令如下:
wolcmd 1c1b0d02e587 192.168.150.245 255.255.255.0 8900