0

Continuation from this question

I want to send magic packet for wake on lan from my custom router(raspberry pi). Below is network image;

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 as Wake-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 in arp command correct?

Answer (For @telcoM's answer)

  • First, I set desktop's ethernet eno1 to Wake-on: g. To do this, I used network 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
3
  • The device looks like a raspberrypi. Using abbreviations is confusing. Commented May 26, 2020 at 6:27
  • It is unclear how this question differs from your previous question. Please keep questions self contained (but then also link to related question), keep them as short as possible (but then add detail). Commented May 26, 2020 at 6:29
  • I edited title and first line.
    – jjjkkkjjj
    Commented May 26, 2020 at 7:58

2 Answers 2

3

When the desktop PC was switched off, RasPi's network interface connected to it reports NO-CARRIER, or in other words, the physical link went down. This means the desktop is not in a wake-on-LAN enabled state.

The Wake-on: d output from ethtool confirms that. d means "wake on nothing", so the wake-on-LAN circuits will not be armed.

Yes, you should set eno1 to Wake-on: g if you want to make it able to wake up on request. You may also have to change a BIOS setting or two to make sure the system firmware will allow the system to wake up.

If you have ErP compliant mode enabled in BIOS settings, you need to disable it: ErP basically means the system will turn totally off to aggressively minimize any kind of stand-by power consumption, and that usually completely powers down the NIC so it won't be able to receive Wake-on-LAN packets.

Your BIOS settins may also have a dedicated Wake-on-LAN setting, or something named more generically like "Wake on PCI". If your BIOS has something like that, you should enable it too. This also helps to ensure that your desktop will go back to WOL-ready state after e.g. a power outage, and not just after a proper shutdown from Linux.

When the desktop is shut down and is ready to Wake-on-LAN, its NIC should remain partially active - it will most likely reduce the link speed to minimize power consumption, but the ip a on the RasPi should still report UP and LOWER_UP on eth1, and ethtool eth1 on the RasPi should say Link detected: yes.

When sending the wake-on-LAN packet, you might have to target it to eth1 network's broadcast address, otherwise the wakeonlan command might fail to choose the correct interface to send the packet out of:

wakeonlan -i 192.168.1.255 -p 7 00:D8:61:56:24:2D
0
0

Just a basic answer. No detail, as I have not done it.

For wake on lan to work the nic of the receiver must remain on ( It will then, not loose its carrier): You first need to check that your hardware has this feature, and that it is enabled in the firmware. Then enable in software. see https://wiki.debian.org/WakeOnLan

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .