wakeonlan with networkd requires MAC address explicitly otherwise it will be ignored
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Netplan |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
"wakeonlan" property doesn't work out of the box, and it requires explicit "match" with MAC address. However, it's not documented explicitly in the reference:
https:/
> wakeonlan (bool)
>
> : Enable wake on LAN. Off by default.
[doesn't work]
$ cat /etc/netplan/
# This is the network config written by 'subiquity'
network:
ethernets:
enp31s0:
dhcp4: true
wakeonlan: true ## <----
version: 2
The button line of the error[1] is:
-> enp31s0: Config file /run/systemd/
[works]
$ cat /etc/netplan/
# This is the network config written by 'subiquity'
network:
ethernets:
enp31s0:
match:
macaddress: 70:85:c2:ae:bc:08 ## <----
dhcp4: true
wakeonlan: true ## <----
version: 2
-> enp31s0: Config file /run/systemd/
[1]
$ sudo SYSTEMD_
Trying to open "/etc/systemd/
Trying to open "/etc/udev/
Trying to open "/usr/lib/
Trying to open "/lib/systemd/
Trying to open "/lib/udev/
=== trie on-disk ===
tool version: 245
file size: 9953169 bytes
header size 80 bytes
strings 2163737 bytes
nodes 7789352 bytes
Load module index
Found container virtualization none.
timestamp of '/etc/systemd/
timestamp of '/run/systemd/
Parsed configuration file /usr/lib/
Parsed configuration file /usr/lib/
Parsed configuration file /run/systemd/
Created link configuration context.
ID_NET_DRIVER=r8169
enp31s0: Device has name_assign_type=4
enp31s0: Config file /run/systemd/
enp31s0: Config file /usr/lib/
ethtool: autonegotiation is unset or enabled, the speed and duplex are not writable.
enp31s0: Device has name_assign_type=4
Using default interface naming scheme 'v245'.
enp31s0: Policy *keep*: keeping existing userspace name
enp31s0: Device has addr_assign_type=0
enp31s0: MAC on the device already matches policy *persistent*
ID_NET_
Unload module index
Unloaded link configuration context.
[2]
$ sudo SYSTEMD_
Trying to open "/etc/systemd/
Trying to open "/etc/udev/
Trying to open "/usr/lib/
Trying to open "/lib/systemd/
Trying to open "/lib/udev/
=== trie on-disk ===
tool version: 245
file size: 9953169 bytes
header size 80 bytes
strings 2163737 bytes
nodes 7789352 bytes
Load module index
Found container virtualization none.
timestamp of '/etc/systemd/
timestamp of '/run/systemd/
Parsed configuration file /usr/lib/
Parsed configuration file /usr/lib/
Parsed configuration file /run/systemd/
Created link configuration context.
ID_NET_DRIVER=r8169
enp31s0: Config file /run/systemd/
ethtool: autonegotiation is unset or enabled, the speed and duplex are not writable.
enp31s0: Device has name_assign_type=4
Using default interface naming scheme 'v245'.
enp31s0: Policies didn't yield a name and Name= is not given, not renaming.
ID_NET_
Unload module index
Unloaded link configuration context.
https:/ /github. com/CanonicalLt d/netplan/ pull/180