From:
- https://forum.proxmox.com/threads/wake-on-lan-on-pve.124785/
- https://wiki.archlinux.org/title/Wake-on-LAN#systemd.link
Link-level configuration is possible through systemd-networkd#link files. The actual setup is performed by the net_setup_link udev builtin. Add the WakeOnLan option to the network link file:
add this file with the contents below(don't forget to edit your MAC address accordingly) /etc/systemd/network/50-wired.link
[Match]
MACAddress=aa:bb:cc:dd:ee:ff
[Link]
NamePolicy=kernel database onboard slot path
MACAddressPolicy=persistent
WakeOnLan=magic
reboot and test it.
From:
- https://forum.proxmox.com/threads/wake-on-lan-on-pve.124785/
- https://wiki.archlinux.org/title/Wake-on-LAN#systemd.link
- https://dev.to/zakery1369/enable-wake-on-lan-on-debian-4ljd
- https://www.youtube.com/watch?v=mFKWOTi1jPE
- https://i12bretro.github.io/tutorials/0608.html
- https://www.youtube.com/watch?v=sZcOlW-DwrU
- https://www.youtube.com/watch?v=_hOBAGKLQkI
Wake on LAN is very useful functionality if your hardware supports it. Here is a good tutorial on the steps required to enable WOL on a device. This typically needs to be enabled in the BIOS first and the steps below will enable it in Linux https://www.lifewire.com/wake-on-lan-4149800
- After enabling WOL in the BIOS, boot into Linux and login
- Run the following commands in a terminal window
# install ethtool
sudo apt install ethtool -y
# list network devices
ip addr
- Look for the device that has a local IP address (192.168 or 10.10)
- Note the device name and the MAC address for use later when sending the magic packet
- Continue with the following commands to check if the device supports WOL
# replace eno1 with the device name to test
sudo ethtool eno1
- Find the Supports Wake-on line
- If it contains a g it supports WOL, continue with the following commands
# enable wol on the device
sudo ethtool -s eno1 wol g
# edit the network interfaces configuration
sudo nano /etc/network/interfaces
- Paste the following below the iface line for the network device
ethernet-wol g
- Press CTRL+O, Enter, CTRL+X to write the changes
- Shutdown the device
- Test to see if WOL is working by sending a magic packet
- If everything is setup correctly the device should awaken from it's slumber and boot up
- Log back into the device and run the following command to verify the Wake-on value has updated to g on boot
# replace eno1 with the device name to test
sudo ethtool eno1
NOTE: If the WOL flag doesn't stick with the configuration above, replace the "ethernet-wol g" value in /etc/network/interfaces with "post-up /usr/sbin/ethtool -s eno1 wol g", replacing eno1 with the name of the interface.