Replace dhclient with dhcpcd

Bug #2024164 reported by Benjamin Drung
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
initramfs-tools (Ubuntu)
Fix Released
High
Unassigned
isc-dhcp (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

ISC has announced the end of life for ISC DHCP as of the end of 2022. Kea is the recommended successor of the DHCP server (isc-dhcp-server). This bug report is about replacing the DHCP client (isc-dhcp-client).

Ubuntu uses NetworkManager on the desktop and systemd-networkd on the server as default DHCP client. However isc-dhcp-client is still installed as part of all Ubuntu systems, because it is the only client implementation that integrates with initramfs-tools. isc-dhcp-client is also used by cloud-init and as a command line tool to configure transient DHCP on an interface.

There are following requirements for the replacement DHCP client:
1. The DHCP client must support DHCPv6.
2. The DHCP client in the initramfs should be small enough to not increase the size noticeable.
3. The DHCP client needs to be callable from the shell (for initramfs and cloud-init)

The Ubuntu desktop uses network-manager and the server/cloud images uses systemd-networkd. So there is no need for changing the DHCP client on booted systems, but the initramfs uses dhclient from isc-dhcp-client.

ipconfig (from klibc-utils) does not support DHCPv6 (but there is work in progress in https://git.kernel.org/pub/scm/linux/kernel/git/bwh/klibc.git/?h=ipv6). systemd-networkd, network-manager, and dhcpcanon pull in too many packages/libraries for the initramfs use case (unless using a systemd-based boot). For example, /lib/systemd/systemd-networkd is 1.6 MB big and directly depends on 24 libraries.

systemd-networkd is designed to run as a service. It takes no arguments when called. So it must run as daemon.

Therefore only dhcpcd and udhcpc remain as replacement (for the initramfs). From those two, I propose to use dhcpcd as replacement, because:
* It has many features (like classless static routes or DHCP over InfiniBand)
* It is actively developed (normally a few release per year)

Tags: fr-2925
Benjamin Drung (bdrung)
tags: added: fr-2925
Changed in initramfs-tools (Ubuntu):
assignee: nobody → Benjamin Drung (bdrung)
status: New → Triaged
importance: Undecided → High
Revision history for this message
Benjamin Drung (bdrung) wrote :

Pushed change to ubuntu/devel-dhcpcd branch:
https://code.launchpad.net/~ubuntu-core-dev/ubuntu/+source/initramfs-tools/+git/initramfs-tools/+ref/ubuntu/devel-dhcpcd

The upload needs to wait for the dhcpcd MIR in bug #2019191

Changed in initramfs-tools (Ubuntu):
status: Triaged → In Progress
Benjamin Drung (bdrung)
Changed in initramfs-tools (Ubuntu):
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package initramfs-tools - 0.142ubuntu10

---------------
initramfs-tools (0.142ubuntu10) mantic; urgency=medium

  * Fix resolving wrong multiarch libdir in dhcpcd hook (LP: #2031363)

initramfs-tools (0.142ubuntu9) mantic; urgency=medium

  * Replace dhclient by dhcpcd (LP: #2024164)
  * Merge consecutive manual_add_modules calls into one

 -- Benjamin Drung <email address hidden> Tue, 15 Aug 2023 20:41:22 +0200

Changed in initramfs-tools (Ubuntu):
status: Fix Committed → Fix Released
Benjamin Drung (bdrung)
Changed in initramfs-tools (Ubuntu):
assignee: Benjamin Drung (bdrung) → nobody
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package isc-dhcp - 4.4.3-P1-2ubuntu5

---------------
isc-dhcp (4.4.3-P1-2ubuntu5) mantic; urgency=medium

  * Remove initramfs-tools integration from isc-dhcp-client.
    initramfs-tools >= 0.142ubuntu9 uses dhcpcd instead of dhclient.
    (LP: #2024164)
  * autopkgtest: Ensure that /var/lib/dhcp/dhcpd.leases is present

 -- Benjamin Drung <email address hidden> Tue, 05 Sep 2023 12:55:20 +0200

Changed in isc-dhcp (Ubuntu):
status: New → Fix Released
Revision history for this message
TrReardon (tr-reardon) wrote :

The dependency should be on ubuntu-minimal, not initramfs-tools, just as with isc-dhcp-client

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.