#1110741 ifupdown: Stateful DHCPv6 with dhcpcd-base causes ifup to fail

Package:
ifupdown
Source:
ifupdown
Description:
high level tools to configure network interfaces
Submitter:
Marvin Gülker
Date:
2025-10-27 07:32:02 UTC
Severity:
normal
#1110741#5
Date:
2025-08-10 16:53:34 UTC
From:
To:
Dear Maintainer,

I just upgraded to Debian Trixie. The release notes say that
isc-dhcp-client is deprecated and should be replaced with dhcpcd-base.
I tried, but it appears to be incompatible with my network
configuration, which uses stateful DHCPv6. This is on a server which
uses the venerable ifupdown with this configuration in
/etc/network/interfaces:

    # This file describes the network interfaces available on your system
    # and how to activate them. For more information, see interfaces(5).

    source /etc/network/interfaces.d/*

    # The loopback network interface
    auto lo
    iface lo inet loopback

    # The primary network interface
    allow-hotplug enp2s0
    iface enp2s0 inet dhcp
    iface enp2s0 inet6 dhcp

Trying to raise enp2s0 on boot fails with this log:

    Aug 10 18:21:39 zugspitze systemd[1]: Started ifup@enp2s0.service - ifup for enp2s0.
    Aug 10 18:21:39 zugspitze ifup[1125]: dhcpcd-10.1.0 starting
    Aug 10 18:21:39 zugspitze dhcpcd[1125]: dhcpcd-10.1.0 starting
    Aug 10 18:21:40 zugspitze ifup[1131]: enp2s0: waiting for carrier
    Aug 10 18:21:40 zugspitze dhcpcd[1131]: enp2s0: waiting for carrier
    Aug 10 18:21:43 zugspitze ifup[1131]: enp2s0: carrier acquired
    Aug 10 18:21:43 zugspitze dhcpcd[1131]: enp2s0: carrier acquired
    ...
    Aug 10 18:21:44 zugspitze ifup[1131]: enp2s0: soliciting a DHCP lease
    Aug 10 18:21:44 zugspitze dhcpcd[1131]: enp2s0: soliciting a DHCP lease
    Aug 10 18:21:44 zugspitze ifup[1131]: enp2s0: offered <redacted IPv4> from <redacted IPv4>
    ...
    Aug 10 18:21:45 zugspitze ifup[1131]: enp2s0: soliciting an IPv6 router
    Aug 10 18:21:45 zugspitze dhcpcd[1131]: enp2s0: soliciting an IPv6 router
    Aug 10 18:21:45 zugspitze ifup[1131]: enp2s0: Router Advertisement from fe80::<redacted>
    ...
    Aug 10 18:21:45 zugspitze ifup[1131]: enp2s0: adding route to 2003:<redacted> via fe80::redacted>
    ...
    Aug 10 18:21:45 zugspitze ifup[1131]: enp2s0: soliciting a DHCPv6 lease
    Aug 10 18:21:45 zugspitze dhcpcd[1131]: enp2s0: soliciting a DHCPv6 lease
    Aug 10 18:21:47 zugspitze ifup[1131]: enp2s0: ADV 2003:<redacted> from fe80::<redacted> (0)
    ...
    Aug 10 18:21:48 zugspitze ifup[1131]: enp2s0: REPLY6 received from fe80::<redacted>
    Aug 10 18:21:48 zugspitze ifup[1131]: enp2s0: adding address 2003:<redacted>
    Aug 10 18:21:48 zugspitze ifup[1131]: enp2s0: renew in 21600, rebind in 34560, expire in 43200 seconds
    Aug 10 18:21:48 zugspitze ifup[1131]: enp2s0: adding default route via fe80::<redacted>
    ...
    Aug 10 18:21:49 zugspitze ifup[1326]: No DHCPv6 client software found!
    Aug 10 18:21:49 zugspitze ifup[1114]: ifup: failed to bring up enp2s0
    Aug 10 18:21:49 zugspitze systemd[1]: ifup@enp2s0.service: Main process exited, code=exited, status=1/FAILURE
    Aug 10 18:21:49 zugspitze dhcpcd[1131]: received SIGTERM, stopping
    Aug 10 18:21:49 zugspitze dhcpcd[1131]: enp2s0: removing interface
    Aug 10 18:21:49 zugspitze dhcpcd[1131]: script_status: /usr/lib/dhcpcd/dhcpcd-run-hooks: Terminated
    Aug 10 18:21:49 zugspitze dhcpcd[1131]: dhcpcd exited
    Aug 10 18:21:49 zugspitze systemd[1]: ifup@enp2s0.service: Failed with result 'exit-code'.

Some Internet research suggests that this is problem with ifupdown rather than with dhcpcd (see https://unix.stackexchange.com/a/789391), so I thought it is best to report this formally to get it fixed at some point.

For now, I will revert to isc-dhcp-client, but as that one is going to go away on the long run, it would be good to have ifupdown work with dhcpcd instead for DHCPv6.

   * What led up to the situation?

I replaced isc-dhcp-client with dhcpcd-base as recommended by the release notes.

   * What exactly did you do (or not do) that was effective (or
     ineffective)?

$ apt install dhcpcd-base && apt-purge isc-dhcp-client

   * What was the outcome of this action?

ifup exits with an error message.

   * What outcome did you expect instead?

It should not exit with an error message and instead use dhcpcd's DHCPv6 facilities.

Sincerly,

  Marvin Gülker
--- /etc/network/interfaces.d/*:
cat: '/etc/network/interfaces.d/*': No such file or directory
--- up and down scripts installed: /etc/network/if-down.d: total 4 -rwxr-xr-x 1 root root 759 Dec 9 2022 resolved /etc/network/if-post-down.d: total 0 /etc/network/if-pre-up.d: total 0 /etc/network/if-up.d: total 8 -rwxr-xr-x 1 root root 4665 Aug 20 2024 resolved
#1110741#10
Date:
2025-10-13 16:13:35 UTC
From:
To:
With dhcpcd one only needs one line to handle both IPv4 and IPv6. Can
you try commenting either the inet or intet6 line and see if this
fixes it?

Martin-Éric

#1110741#15
Date:
2025-10-13 17:48:01 UTC
From:
To:
This sounds like an implementation detail of dhcpcd; relying on it
breaks the ifupdown contract with the user.

It's nice that dhcpcd can do both together but that mode should be
selected as an optimisation by ifupdown when both inet and inet6 stanzas
request dhcp. There are many combinations that users might select and
stateful dhcp for both is probably not the main one: DHCPv4+SLAAC+RDNSS
and DHCPv4+SLACC+statelessDHCP being both more common and other options
also being possible like DHCPv4 + manual configuration because v4 is on
NAT and v6 wants a well-(locally-)defined address.

#1110741#20
Date:
2025-10-13 18:14:33 UTC
From:
To:
ma 13.10.2025 klo 20.48 Andrew Bower (andrew@bower.uk) kirjoitti:

dhcpcd can already do any combination of these via options in
/etc/dhcpcd.conf. It also could do the same via command line options
passed by ifupdown.

What is undesirable is retaining ifupdown's outdated idea of having
separate inet and inet6 lines for interfaces that don't require any
static IP since dhcpcd can already handle all cases for dynamic IPv4
and IPv6 configuration. What's instead needed is for ifupdown to
acquire the ability to pass both IPv4  and IPv6 options to dhcpcd via
a single command line recipe.

Martin-Éric

#1110741#25
Date:
2025-10-25 12:34:22 UTC
From:
To:
Dear all,

I used ifupdown just out of habit like I always did. So, what I did now is to
remove ifupdown alltogether and replaced it with pure dhcpcd, which is
started on boot via a systemd service file dhcpcd.service, which seems
to do just the correct things. Installing it pulled in and enabled wpa_supplicant
for some reason, which I do not need on a server, but that was just a
oneliner to disable wpa_supplicant.service again. My machine now
properly pulls both an IPv4 and IPv6 address via DHCP.

So, my problem is “solved” now. I leave it to you to decide what to do
with the interaction of ifupdown and dhcpcd.

Am 13. Oktober 2025 um 21:14 Uhr +0300 schrieb Martin-Éric Racine:

#1110741#30
Date:
2025-10-25 12:43:35 UTC
From:
To:
Hi Marvin,

I'm working on a proper fix in ifupdown, see
https://lists.debian.org/debian-devel/2025/10/msg00201.html.

#1110741#35
Date:
2025-10-25 18:42:46 UTC
From:
To:
Dear Daniel,

Am 25. Oktober 2025 um 14:43 Uhr +0200 schrieb Daniel Gröber:

I read through that e-mail and took a look at your reported issues
against dhcpcd, oh my! Thanks for tackling that problem. One note: I
overlooked it initially, but the package description for the "dhcpcd"
package actively warns against using dhcpcd with ifupdown:

I stuck to the release notes, but if I had read this I should have known better.

Thank you and the others in this thread for pointing me int othe right
direction.

#1110741#40
Date:
2025-10-27 07:29:15 UTC
From:
To:
la 25.10.2025 klo 15.34 Marvin Gülker (mg@guelker.eu) kirjoitti:

For most cases, using a daemonized dhcpcd indeed is the best approach
precisely because it seamlessly handles IPv4 and IPv6 configuration.

IMHO, nowadays ifupdown only is useful for cases where someone needs
to create bridges or vlans using a simplified syntax. For everything
else, dhcpcd already covers most usage cases, including static IP
addresses and IPv6PD. If it ever offered the capability of creating
bridges and vlans, dhcpcd would be a perfect ifupdown replacement.

Martin-Éric