Continuation from this question
I want to send magic packet for wake on lan from my custom router(raspberry pi). Below is network image;
I used wakeonlan to send magic packet. However, Desktop PC wasn't woke up...
Here is setup information.
Raspi(router) (When the desktop PC was switched on)
$ ip a
1: lo: ~~~~~
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether b8:27:eb:df:31:9c brd ff:ff:ff:ff:ff:ff
inet 172.16.0.20/23 brd 172.16.1.255 scope global noprefixroute eth0
valid_lft forever preferred_lft forever
inet6 fe80::51dd:e5ef:c061:adb9/64 scope link
valid_lft forever preferred_lft forever
3: wlan0: ~~~~~
4: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether 04:ab:18:3b:af:e2 brd ff:ff:ff:ff:ff:ff
inet 192.168.1.1/24 brd 192.168.1.255 scope global noprefixroute eth1
valid_lft forever preferred_lft forever
inet6 fe80::83fa:6dee:9799:9a6e/64 scope link
valid_lft forever preferred_lft forever
5: vpn_vpn_nic: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN group default qlen 1000
link/ether 5e:ab:14:17:ae:3a brd ff:ff:ff:ff:ff:ff
inet 192.168.0.20/24 brd 192.168.0.255 scope global noprefixroute vpn_vpn_nic
valid_lft forever preferred_lft forever
inet6 fe80::ebcc:65ba:a7f4:a21e/64 scope link
valid_lft forever preferred_lft forever
inet6 fe80::5cab:14ff:fe17:ae3a/64 scope link
valid_lft forever preferred_lft forever
$ arp
Address HWtype HWaddress Flags Mask Iface
172.16.0.91 ether 38:f9:d3:61:a4:2a C eth0
172.31.68.210 ether 00:ae:43:d1:c7:a2 C vpn_vpn_nic
192.168.0.12 ether 5e:57:21:b5:c2:2e C vpn_vpn_nic
192.168.1.19 ether 00:d8:61:56:24:2d C eth1
172.16.0.1 ether 00:60:b9:7f:82:0f C eth0
Desktop
$ ip a
1: lo: ~~~~~~~
2: eno1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
link/ether 00:d8:61:56:24:2d brd ff:ff:ff:ff:ff:ff
inet 192.168.1.19/24 brd 192.168.1.255 scope global noprefixroute eno1
valid_lft forever preferred_lft forever
inet6 fe80::2d8:61ff:fe56:242d/64 scope link
valid_lft forever preferred_lft forever
$ sudo ethtool eno1
Settings for eno1:
Supported ports: [ TP ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Supported pause frame use: No
Supports auto-negotiation: Yes
Supported FEC modes: Not reported
Advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
Advertised pause frame use: No
Advertised auto-negotiation: Yes
Advertised FEC modes: Not reported
Speed: 1000Mb/s
Duplex: Full
Port: Twisted Pair
PHYAD: 1
Transceiver: internal
Auto-negotiation: on
MDI-X: on (auto)
Supports Wake-on: pumbg
Wake-on: d
Current message level: 0x00000007 (7)
drv probe link
Link detected: yes
$ arp
Address HWtype HWaddress Flags Mask Iface
_gateway ether 04:ab:18:3b:af:e2 C eno1
Raspi(router) (When the desktop PC was switched off)
$ ip a
~~~~
4: eth1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN group default qlen 1000
link/ether 04:ab:18:3b:af:e2 brd ff:ff:ff:ff:ff:ff
~~~~
When the desktop PC is switched off, eth1
connecting to desktop PC was lost.
$ arp
Address HWtype HWaddress Flags Mask Iface
172.16.0.91 ether 38:f9:d3:61:a4:2a C eth0
172.31.68.210 ether 00:ae:43:d1:c7:a2 C vpn_vpn_nic
192.168.0.12 ether 5e:57:21:b5:c2:2e C vpn_vpn_nic
172.16.0.1 ether 00:60:b9:7f:82:0f C eth0
Wake on lan command in raspi.
wakeonlan -p 7 00:D8:61:56:24:2D
Question
Should I set Desktop's
eno1
asWake-on: g
permanently?Is my raspi's routing wrong?
Why could NOT magic packet be reached to Desktop in spite of broadcasting(255.255.255.255)? I can't find the cause...
When the desktop PC is switched off, is Missing
eth1
inarp
command correct?
Answer (For @telcoM's answer)
- First, I set desktop's ethernet
eno1
toWake-on: g
. To do this, I usednetwork manager
because my desktop PC is Ubuntu 18.04.
$ sudo vi /etc/netplan/~~~.yaml
# Let NetworkManager manage all devices on this system
network:
version: 2
renderer: NetworkManager
ethernets:
eno1:
dhcp4: no
wakeonlan: true <<<<<<< Newly Added
addresses: [192.168.1.19/24]
gateway4: 192.168.1.1
nameservers:
addresses: [8.8.8.8,8.8.4.4]
Second, I set BIOS's
ErP
mode to disabled.Then, raspi(router) detected
eth1
;
4: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether 04:ab:18:3b:af:e2 brd ff:ff:ff:ff:ff:ff
inet 192.168.1.1/24 brd 192.168.1.255 scope global noprefixroute eth1
valid_lft forever preferred_lft forever
inet6 fe80::83fa:6dee:9799:9a6e/64 scope link
valid_lft forever preferred_lft forever
- Finally, following command allow PC to wake up, and previous question has resolved completely!!!
wakeonlan -i 192.168.1.255 -p 7 00:D8:61:56:24:2D