Note only DHCP configuration exhibits this particular issue. The cause
is that when "dhcp4" is set to "yes" in the /etc/netplan/*.yaml config
file, netplan would generate a temporary per-interface yaml file under
/run/netplan, which matches interface using MAC address. While I don't
see this specific MAC matching when using static IP configuration.
vsbalakr@ubuntu-18:~$ cat /run/netplan/ens3.yaml
network:
version: 2
renderer: networkd
ethernets:
ens3:
match:
macaddress: "ba:fb:9f:12:2f:02"
set-name: ens3
dhcp4: true
dhcp-identifier: mac
critical: true
vsbalakr@ubuntu-18:~$ cat /etc/netplan/01-netcfg.yaml
# This file describes the network interfaces available on your system
# For more information, see netplan(5).
network:
version: 2
renderer: networkd
ethernets:
ens3:
dhcp4: yes
gateway4: 10.211.8.1
nameservers:
addresses: [10.211.11.1,10.209.76.197]
Which in turn gets systemd-networkd to generate these config files, also
using MAC address to match interface:
vsbalakr@ubuntu-18:~$ cat /run/systemd/network/10-netplan-ens3.link
[Match]
MACAddress=ba:fb:9f:12:2f:02
OriginalName=ens3
[Link]
Name=ens3
WakeOnLan=off
vsbalakr@ubuntu-18:~$ cat /run/systemd/network/10-netplan-ens3.network
[Match]
MACAddress=ba:fb:9f:12:2f:02
Name=ens3
[Network]
DHCP=ipv4
LinkLocalAddressing=ipv6
Gateway=10.211.8.1
DNS=10.211.11.1
DNS=10.209.76.197
[DHCP]
UseMTU=true
RouteMetric=100
ClientIdentifier=mac
CriticalConnection=true
Why DHCP config needs to match MAC while static config doesn't? Is it
possible not to match by MAC for DHCP, unless users explicitly ask for
it?
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1820929
Title:
netplan should consider adding more udev attribute for exact matching
of failover 3-netdev interfaces
To manage notifications about this bug go to:
https://bugs.launchpad.net/netplan/+bug/1820929/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs