Skip to content

Initramfs missing default route when using a /32 IP address #1581

Open
@i1052

Description

@i1052

[bug]: This bug persists when IP address is x.x.x.x/32 and the gateway address isn't in same subnet. Some VPS providers offer you a /32 IP address and it works fine in ubuntu/debian etc.

Describe the bug
If the initramfs going to downloading the live filesystem from github.com , it will stuck in resolving domain because no network connection. The log shows:

 IP-Config: e2 hardware address 12:7d:2a:aa:aa:aa mtu 1500 DHCP RARP
 IP-Config: e2 guessed broadcast address 154.11.22.33
 IP-Config: failed to set routes on e2
 IP-Config: e2 complete (dhcp from 193.250.250.250):
 address: 154.11.22.33
 broadcast: 154.11.22.33
 netmask: 255.255.255.255
 gateway: 193.250.250.250
 dns0: 1.1.1.1
 dns1: 1.0.0.1
 rootserver: 193.250.250.250 
 rootpath: filename
 Creating /etc/resolv.conf
 Begin: Trying wget https://github.com/netbootxyz/debian-squash/releases/dowmload
 /1.5-rolling-202502190007-0d0f700e/filesystem.squashfs -O /live/medium/live/filesystem.squashfs
 
 r1: (6) Could not resolve host: github.com
 BusyBox v1.35.0 (Debian 1:1.35.0-4+b3) built-in shell (ash)
 Enter 'help' for a list of built-in commands.
 (initramfs) No supported filesystem images found at /live.

If manually add the route using:

ip route add default dev e2

It will bring the network back.

To Reproduce
Steps to reproduce the behavior:

  1. boot netboot.xyz with DHCP or manually IP config.
  2. choose VyOS in Install Linux (or others like debian, same behavior)
  3. booting into initramfs then stuck at downloading live filesystem.

Expected behavior
IP-Config e2 set routes need to using ip route add default dev e2 instead of ip route add default via 193.250.250.250 when the interface IP is /32.

Additional context
The netmask of those IPs is /32 because the tweaked configuration is as if they're not sitting in any network: they only need their gateway. The gateway's IP route has to be explicitly added directly on the interface.
The bug can be relate to #1485 .

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions