Subiquity ignores the IPv4 default gateway and creates network settings incorrectly.

Bug #2012084 reported by Kensuke Yanai
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
subiquity
New
Undecided
Unassigned

Bug Description

I prepared the 22.04.2 ISO file to install Ubuntu Server. I loaded the image and launched the installer. Since there is no DHCP server in that network environment, I manually configured the IPv4 and IPv6 network settings. After proceeding with the steps, I tried to fetch the SSH Key from GitHub in the "SSH Setup" section, but encountered an error saying "Failed to establish a new connection: [Errno 101] Network is unreachable."

Upon investigating the cause, I found that the IPv4 gateway setting was missing in `/etc/netplan/00-installer-config.yaml`.

```yaml
# This is the network config written by 'subiquity'
network:
  ethernets:
    ens3:
      addresses:
      - ***.***.***.***/23
      - ****:****::****/64
      nameservers:
        addresses:
        - ***.****.***.***
        - ****:****::****
        search: []
      routes:
      - to: default
        via: fe80::1
  version: 2
```

In this situation, I tested the ping command:

```shell
root@ubuntu-server: /# ping 1.1.1.1
ping: connect: Network is unreachable

root@ubuntu-server: /# ping6 2606:4700:4700::1111
PING 2606:4700:4700::1111(2606:4700:4700::1111) 56 data bytes
64 bytes from 2606:4700:4700::1111: icmp_seq=1 ttl=57 time=1.41 ms
```

Next, I edited the /etc/netplan/00-installer-config.yaml file as follows:

```yaml
# This is the network config written by 'subiquity'
network:
  ethernets:
    ens3:
      addresses:
      - ***.***.***.***/23
      - ****:****::****/64
      nameservers:
        addresses:
        - ***.****.***.***
        - ****:****::****
        search: []
      routes:
      - to: default # here
        via: ***.***.***.*** # here
      - to: default
        via: fe80::1
  version: 2
```
Afterwards, by executing `sudo netplan apply`, I was able to connect to the IPv4 network as well.
I suspect that the netplan config generated by the installer is incorrect.

Can you please check and confirm this issue? Thank you for your cooperation.

---

I used the following ISO file:
https://releases.ubuntu.com/22.04.2/ubuntu-22.04.2-desktop-amd64.iso

ProblemType: Bug
DistroRelease: Ubuntu 22.04
Uname: Linux 5.15.0-60-generic x86_64
Architecture: amd64
Date: Fri Mar 17 15:06:18 2023
ProcEnviron:
 TERM=linux
 PATH=(custom, no user)
 LANG=C.UTF-8
Snap: subiquity 23.02.1 ()
Snap.Changes:
 ID Status Spawn Ready Summary
 4 Done 2023-03-17T14:58:28Z 2023-03-17T14:58:28Z Switch "subiquity" snap to channel "stable/ubuntu-22.04.2"
Snap.Connections:

SnapSource: subiquity
Symptom: installer

Revision history for this message
Kensuke Yanai (yanakence-deactivatedaccount) wrote :
summary: - In the Ubuntu Server 22.04.2 installer, when configuring IPv4 and IPv6
- network settings in an environment without a DHCP server, the IPv4
- gateway setting is ignored.
+ Subiquity ignores the IPv4 default gateway and creates network settings
+ incorrectly.
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.