root@moco:~# ifconfig
eth0 Link encap:Ethernet HWaddr 00:19:21:64:8f:6c
inet addr:192.168.10.13 Bcast:192.168.10.255 Mask:255.255.255.0
inet6 addr: fe80::219:21ff:fe64:8f6c/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:120 errors:0 dropped:0 overruns:0 frame:0
TX packets:200 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:12556 (12.5 KB) TX bytes:31008 (31.0 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:183 errors:0 dropped:0 overruns:0 frame:0
TX packets:183 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:30288 (30.2 KB) TX bytes:30288 (30.2 KB)
root@moco:~# vi /etc/network/interfaces
# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface lo inet loopback
追加
auto eth0
iface eth0 inet static
address 192.168.10.13
netmask 255.255.255.0
broadcast 192.168.10.255
gateway 192.168.10.1
dns-nameservers 192.168.10.1
ethtool_opts="wol g" // wake on lan 設定追加
------------------------
192.168.10.11 マシンの電源を投入・起動
root@moco:~# wakeonlan 00:00:e2:73:4a:5c
Sending magic packet to 255.255.255.255:9 with 00:00:e2:73:4a:5c
起動成功
起動される側のPCの設定 eth1というNICがマジックパケットを受け取れるように root@hide:~# ethtool -s eth1 wol g |
自身のeth0というNICがマジックパケットを受け取れるように
root@moco:~# ethtool -s eth0 wol g
設定を確認
root@moco:~# ethtool eth0
Settings for eth0:
Supported ports: [ TP MII ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
Supported pause frame use: No
Supports auto-negotiation: Yes
Advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
Advertised pause frame use: No
Advertised auto-negotiation: Yes
Link partner advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
Link partner advertised pause frame use: Symmetric
Link partner advertised auto-negotiation: Yes
Speed: 100Mb/s
Duplex: Full
Port: MII
PHYAD: 32
Transceiver: internal
Auto-negotiation: on
Supports Wake-on: pumbg
Wake-on: g // g を確認
Current message level: 0x00000007 (7)
drv probe link
Link detected: yes