DietPi icon indicating copy to clipboard operation
DietPi copied to clipboard

Replacing deprecated isc-dhcp-client (dhclient)

Open MichaIng opened this issue 2 months ago • 1 comments

Discussed in https://github.com/MichaIng/DietPi/discussions/7796

Originally posted by Snurring November 1, 2025 Hi,

The dhcp client currently in use in dietpi has been deprecated for years. Do you plan to replace it in future releases?

MichaIng avatar Nov 01 '25 13:11 MichaIng

Background:

  • Client deprecation: https://www.isc.org/blogs/dhcp-client-relay-eom/
  • Server deprecation: https://www.isc.org/blogs/isc-dhcp-eol/

Here the DHCP clients supported by ifupdown in Debian Bookworm, which did not change in Trixie or Forky so far: https://manpages.debian.org/bookworm/ifupdown/interfaces.5.en.html#The_dhcp_Method

  • udhcpc depends on busybox, but both is tiny.

  • dhcpcd is well known, and can be installed without the systemd/init.d services, to avoid conflicts: https://packages.debian.org/dhcpcd-base Needs testing, e.g. it must run with --nohook to avoid unintentional interference. Better to be implemented only after we dropped Bullseye support with first release next year. The older dhcpcd5 source does not provide a standalone executable package without systemd unit, and the main package name differs as well.

For the same reason, the isc-dhcp-server (dhcpd) for the WiFi hotspot should be replaced.

  • A known alternative, which includes DNS where needed, is dnsmasq. However, I am not sure whether DNS can be disabled completely, which is mandatory for us to maintain compatibility with Unbound, Pi-hole etc.
  • ISC themselves provide their successor Kea, which provides a lot of features including database server backends and all such. But means large size and high complexity, not exactly a default solution I'd usually pick for DietPi.
  • Not so well known, but there is also CoreDHCP: https://packages.debian.org/coredhcp-server
  • Oh wait, as I was mentioning udhcpc as client, there is the respective server as well: udhcpd Quite an idea to use those two, as they seem to be very simple minimal implementations. Little side effect is that initramfs-tools by default uses busybox instead of klibc utils, if installed. AFAIK it adds some more features to the initramfs console, but might also raise its size a bit.

MichaIng avatar Nov 01 '25 13:11 MichaIng