[Bug 2060778] Re: netplan, multiple dhcp route with metric failure

Lukas Märdian 2060778 at bugs.launchpad.net
Mon Apr 22 12:15:04 UTC 2024


Thanks for the additional details!

In this case the output of "resolvectl" after "netplan apply" and after
resume (no "netplan apply") might be useful. In addition to debug-logs
of your systemd-resolved


$ sudo systemctl edit systemd-resolved

Adding:
```
[Service]
Environment=SYSTEMD_LOG_LEVEL=debug
```

$ sudo systemctl daemon-reload
$ sudo systemctl restart systemd-resolved # (or reboot)

Afterwards:
$ journalctl -u systemd-resolved # (for a full "netplan apply", suspend, resume cycle)

** Changed in: netplan
       Status: Incomplete => Invalid

** Summary changed:

- netplan, multiple dhcp route with metric failure
+ systemd-resolved switches primary interface for name resolution after suspend/resume cycle

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to systemd in Ubuntu.
https://bugs.launchpad.net/bugs/2060778

Title:
  systemd-resolved switches primary interface for name resolution after
  suspend/resume cycle

Status in Netplan:
  Invalid
Status in systemd package in Ubuntu:
  New

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-overrides:
          route-metric: 200
    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-ovs-cleanup.service changed on disk. Run 'systemctl daemon-reload' to reload units.'.)

To manage notifications about this bug go to:
https://bugs.launchpad.net/netplan/+bug/2060778/+subscriptions




More information about the foundations-bugs mailing list