initrd starts dhclient on interfaces that are not supposed to get an IP address
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
initramfs-tools (Ubuntu) |
Triaged
|
Medium
|
Unassigned | ||
netplan.io (Ubuntu) |
Triaged
|
Low
|
Unassigned |
Bug Description
After trying several setups, I think this is a bug. If not - I can't find how to fix things.
Setup: Ubuntu 22.04, with ubuntu-minimal installed (which depends on isc-dhcp-client). A network with a bridge interface. This can be anything, even an old /etc/network/
network:
version: 2
ethernets:
enp4s0:
dhcp4: no
dhcp6: no
bridges:
br0:
interfaces: [enp4s0]
dhcp4: yes
dhcp6: yes
parameters:
stp: false
What happens:
Starting this machine will, during initrd phase, make dhclient fetch an IP address for enp4s0. Then netplan takes over and fetches an address for br0. If both enp4s0 and br0 have the same IP address from the DHCP-server, the machine will not be reachable.
What should happen:
enp4s0 should not get an IP address, as the netplan-
A workaround is to remove isc-dhcp-client (which, in turn, removes meta-package ubuntu-minimal) and run update-initramfs -k all -u; afterwards, the dhclient in initrd is (obviously) not there anymore.
Changed in initramfs-tools (Ubuntu): | |
importance: | Undecided → Medium |
Changed in netplan.io (Ubuntu): | |
importance: | Undecided → Medium |
Changed in initramfs-tools (Ubuntu): | |
status: | New → Triaged |
Changed in netplan.io (Ubuntu): | |
status: | New → Triaged |
Can you specify how you boot your system? Which parameters do you pass to the kernel?
Do you need IP configuration in your initrd? Otherwise you can drop the ip= or ip6= parameter from the kernel command line.