Riaan's SysAdmin Blog

My tips, howtos, gotchas, snippets and stuff. Use at your own risk!

LinuxUbuntuWakeOnLAN

Linux WakeOnLAN Issue

Wake On LAN Issue

I had a strange issue where my ZFS and restic backups to an Ubuntu backup server stopped working. The server had an interesting issue that was totally unrelated. It would boot on manual power-on but start shutting down a couple minutes later. This was completely unrelated to WOL and was fixed after I removed micro8ks.

The WOL issue ended up not actually being anything to do with the backup server but instead the source server(desktop01) not sending the magic packet at all. I figured it out by sniffing the backup server ingress using tcpdump. I could see the traffic come in when sending WOL from my ASUS router.

I suspect the desktop01 server which has multiple virtual interfaces, the wakeonlan utility is getting confused where to send out on. Ended up using etherwake instead of wakeonlan from the source server. Etherwake can specify the interface (-i interface) to send out on.

tcpdump when sending WOL magic packet from ASUS router

# tcpdump -i enp1s0 'ether proto 0x0842 or udp port 9'
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on enp1s0, link-type EN10MB (Ethernet), capture size 262144 bytes
15:22:00.549500 08:62:66:96:e8:e0 (oui Unknown) > f4:b5:20:07:60:e0 (oui Unknown), ethertype Unknown (0x0842), length 116: 
    0x0000:  ffff ffff ffff f4b5 2007 60e0 f4b5 2007  ..........`.....
    0x0010:  60e0 f4b5 2007 60e0 f4b5 2007 60e0 f4b5  ..........`...
    0x0020:  2007 60e0 f4b5 2007 60e0 f4b5 2007 60e0  ............`.
    0x0030:  f4b5 2007 60e0 f4b5 2007 60e0 f4b5 2007  ..............
    0x0040:  60e0 f4b5 2007 60e0 f4b5 2007 60e0 f4b5  ..........`...
    0x0050:  2007 60e0 f4b5 2007 60e0 f4b5 2007 60e0  ............`.
    0x0060:  f4b5 2007 60e0                           ....`.

use etherwake on desktop01

# apt install etherwake

# etherwake -i eno1 f4:b5:20:07:60:e0

tcpdump when using etherwake from desktop01

# tcpdump -i enp1s0 'ether proto 0x0842 or udp port 9'
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on enp1s0, link-type EN10MB (Ethernet), capture size 262144 bytes
...
15:45:29.422859 30:5a:3a:57:63:83 (oui Unknown) > f4:b5:20:07:60:e0 (oui Unknown), ethertype Unknown (0x0842), length 116: 
    0x0000:  ffff ffff ffff f4b5 2007 60e0 f4b5 2007  ..........`.....
    0x0010:  60e0 f4b5 2007 60e0 f4b5 2007 60e0 f4b5  ..........`...
    0x0020:  2007 60e0 f4b5 2007 60e0 f4b5 2007 60e0  ............`.
    0x0030:  f4b5 2007 60e0 f4b5 2007 60e0 f4b5 2007  ..............
    0x0040:  60e0 f4b5 2007 60e0 f4b5 2007 60e0 f4b5  ..........`...
    0x0050:  2007 60e0 f4b5 2007 60e0 f4b5 2007 60e0  ............`.
    0x0060:  f4b5 2007 60e0                           ....`.

NOTE:

  • shutdown the backup server using shutdown now
  • sent wake up from desktop01 and it worked

admin

Bio Info for Riaan