[Bug 2065604] Re: IPv4 default gateway disappears after setting IPv6 address and gateway

Launchpad Bug Tracker 2065604 at bugs.launchpad.net
Wed Aug 21 09:02:18 UTC 2024


Status changed to 'Confirmed' because the bug affects multiple users.

** Changed in: debian-installer (Ubuntu)
       Status: New => Confirmed

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

Title:
  IPv4 default gateway disappears after setting IPv6 address and gateway

Status in debian-installer package in Ubuntu:
  Confirmed

Bug description:
  When doing a clean install (in this case of Ubuntu 24.04, but also
  with 22.04 and possibly even 20.04, but that has been a while…) I
  consistently run into the following situation:

  1) I manually configure IPv4

  I open a console and check the network settings. `ip addr` shows the
  address and `ip route` shows the subnet route and default gateway.

  2) I manually configure IPv6

  I go back to the console and check the network settings again. `ip
  addr` shows both IPv4 and IPv6, `ip -6 route` shows the IPv6 default
  gateway, but `ip route` now only shows the subnet route. The default
  gateway is gone.

  This causes delays when the testing of the repository is done
  (nl.archive.ubuntu.com in my case) as IPv4 packets don't get out and
  only IPv6 works. Later, when trying to import SSH keys from Github it
  completely fails because Github doesn't support IPv6 yet, and the
  system that is being installed doesn't have an IPv4 default gateway.

  This problem persists after boot, as the default IPv4 gateway isn't
  written to the netplan config:

  ```
  sander at cloud:~$ sudo -i
  [sudo] password for sander:
  root at cloud:~# cd /etc/netplan/
  root at cloud:/etc/netplan# ls
  50-cloud-init.yaml
  root at cloud:/etc/netplan# cat 50-cloud-init.yaml
  # This file is generated from information provided by the datasource.  Changes
  # to it will not persist across an instance reboot.  To disable cloud-init's
  # network configuration capabilities, write a file
  # /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg with the following:
  # network: {config: disabled}
  network:
      ethernets:
          ens160:
              addresses:
              - 185.54.92.4/26
              - 2a00:8642:1000:1::4/64
              nameservers:
                  addresses:
                  - 8.8.8.8
                  - 2001:4860:4860::8888
                  search: []
              routes:
              -   to: default
                  via: 2a00:8642:1000:1::1
      version: 2
  root at cloud:/etc/netplan#
  ```

  Manually adding the correct gateway fixes everything:

  ```
  root at cloud:/etc/netplan# cat 50-cloud-init.yaml
  # This file is generated from information provided by the datasource.  Changes
  # to it will not persist across an instance reboot.  To disable cloud-init's
  # network configuration capabilities, write a file
  # /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg with the following:
  # network: {config: disabled}
  network:
      ethernets:
          ens160:
              addresses:
              - 185.54.92.4/26
              - 2a00:8642:1000:1::4/64
              nameservers:
                  addresses:
                  - 8.8.8.8
                  - 2001:4860:4860::8888
                  search: []
              routes:
              -   to: default
                  via: 2a00:8642:1000:1::1
              -   to: default
                  via: 185.54.92.1
      version: 2
  root at cloud:/etc/netplan# netplan apply
  root at cloud:/etc/netplan# ping 8.8.8.8
  PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
  64 bytes from 8.8.8.8: icmp_seq=1 ttl=57 time=6.21 ms
  64 bytes from 8.8.8.8: icmp_seq=2 ttl=57 time=3.81 ms
  ^C
  --- 8.8.8.8 ping statistics ---
  2 packets transmitted, 2 received, 0% packet loss, time 1001ms
  rtt min/avg/max/mdev = 3.805/5.008/6.212/1.203 ms
  root at cloud:/etc/netplan#
  ```

  Fixes the issue, and the system runs fine after that.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/debian-installer/+bug/2065604/+subscriptions




More information about the foundations-bugs mailing list