← Back to team overview

debcrafters-packages team mailing list archive

[Bug 2119120] Re: Netplan/systemd-networkd adds routes for DHCP-Server for multiple interfaces

 

Debug-level logs for systemd-networkd would also be helpful:

$ mkdir -p /etc/systemd/system/systemd-networkd.service.d/
$ cat > /etc/systemd/system/systemd-networkd.service.d/debug.conf << EOF
[Service]
Environment=SYSTEMD_LOG_LEVEL=debug
EOF
$ systemctl daemon-reload
$ systemctl restart systemd-networkd

Then, run your reproducer steps, and then:

$ journalctl -u systemd-networkd --since "5min ago" > systemd-
networkd.log.txt

and attach the result.

** Changed in: systemd (Ubuntu)
       Status: New => Incomplete

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

Title:
  Netplan/systemd-networkd adds routes for DHCP-Server for multiple
  interfaces

Status in netplan.io package in Ubuntu:
  Incomplete
Status in systemd package in Ubuntu:
  Incomplete

Bug description:
  Not sure how to word this one but I'll try:
  I've got a server with 2 Network-Interfaces, `ens160` and `ens192`.
  There's 3 files in `/etc/netplan/:

  /etc/netplan/00-installer-config.yaml.BeforeVMwareCustomization
  ```yaml
  # This is the network config written by 'subiquity'
  network:
    ethernets:
      ens160:
        dhcp4: true
    version: 2
  ```

  /etc/netplan/99-netcfg-vmware.yaml
  ```yaml
  # Generated by VMWare customization engine.
  network:
    version: 2
    renderer: networkd
    ethernets:
      ens160:
        dhcp4: yes
        dhcp4-overrides:
          use-dns: false
        dhcp6: yes
        dhcp6-overrides:
          use-dns: false
        nameservers:
          search:
            - mydomain
          addresses:
            - 10.251.0.18
            - 10.251.0.19
            - 10.251.0.20
  ```

  /etc/netplan/config.yaml
  ```yaml
  network:
      version: 2
      ethernets:
          ens192:
              dhcp4: true
              dhcp4-overrides:
                  use-dns: false
                  use-routes: false
  ```

  After booting, I have the following routes:
  ```bash
  > ip route show
  default via 10.4.0.1 dev ens160 proto dhcp src 10.4.1.47 metric 100
  10.4.0.0/16 dev ens160 proto kernel scope link src 10.4.1.47 metric 100
  10.4.0.1 dev ens160 proto dhcp scope link src 10.4.1.47 metric 100
  10.251.0.18 dev ens192 proto dhcp scope link src 10.255.0.31 metric 100
  10.251.0.18 via 10.4.0.1 dev ens160 proto dhcp src 10.4.1.47 metric 100
  10.255.0.0/16 dev ens192 proto kernel scope link src 10.255.0.31 metric 100
  ```

  This route-Configuration makes 10.251.0.18 unavailable.
  Once I delete the false route, connections to 10.251.0.18 work again:
  ```bash
  > ip route del 10.251.0.18 dev ens192
  > ping 10.251.0.18
  PING 10.251.0.18 (10.251.0.18) 56(84) bytes of data.
  64 bytes from 10.251.0.18: icmp_seq=1 ttl=63 time=0.320 m
  ```

  This wrong route configuration causes my DHCP-Lease to expire before it can be extended, creating a new lease every time and the network connection to be dropped for a few seconds each time it does expire.
  How can I prevent the false route?

  Tidbit: When I delete both routes to 10.251.0.18 and then do `netplan
  apply`, both routes are added again. But ordered the other way around.
  Meaning that the DHCP-Server is still reachable then.

  
  Versions:
  Ubuntu 22.04.5 LTS
  netplan 0.106.1-7ubuntu0.22.04.4

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/netplan.io/+bug/2119120/+subscriptions