systemd-resolved switches primary interface for name resolution after suspend/resume cycle
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Netplan |
Invalid
|
Undecided
|
Unassigned | ||
systemd (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
Hardware/network: PC with single NIC, multiple vlans:
- untagged: default LAN, should be used by the host
- vlan 15: VM network, should only be used by the VM(s) running on the host
Netplan config:
network:
version: 2
renderer: networkd
ethernets:
lan:
match:
macaddress: "XX:XX:XX:XX:XX:XX"
set-name: lan
mtu: 9000
dhcp4: yes
dhcp6: yes
ipv6-privacy: true
bridges:
vm-br0:
dhcp4: yes
interfaces: [vm]
dhcp4-
vlans:
vm:
id: 15
link: lan
(Using networkd as the renderer some apps [App Store, Settings/Online Accounts,...] thinks I'm offline in ubuntu.)
The main problem is with this setup is that after resume the route metrics get mixed up, and the host tries to use the VM network as its default route.
Adding a 'dhcp4-overrides: {route-metric: 10}' stanza to LAN - as the netplan documentation suggests - results in the interfaces not coming up. (Issuing 'netplan try' results in 'Warning: The unit file, source configuration file or drop-ins of netplan-
Sorry, this was overlooked on my side, it is not a bug:
'If both dhcp4 and dhcp6 are true, the networkd back end requires that dhcp4-overrides and dhcp6-overrides contain the same keys and values. If the values do not match, an error will be shown and the network configuration will not be applied.'
Though the original (potentially nasty) issue still persists (even after setting route metrics manually): route metrics are ignored after resume, so routes are mixed up, and a bad default is used!
(So is the 'offline- when-using- networkd' issue.)