Repository navigation
Description
Ideally it would be great to have full support for IPv6 IP assignment by DHCP. @marcos-mendez had a go at it in turnkeylinux/common#339 - using dhcpcd. But as I noted in turnkeylinux/common#339 (comment) unfortunately:
dhcpcdis not compatible withifupdown& use of the/etc/network/interfacesfile.
It also notes that static IPs need to be configured in /etc/dhcpcd.conf which changes our network config completely. And may not be compatible with setting static IPs with Proxmox LXC containers (when you set a static IP in PVE the PVE hosts modifies the LXC guest's /etc/network/interfaces).
My research suggests that our current stack should "just work" with SLAAC (Stateless Address Autoconfiguration) if we add this line to the interfaces file:
iface eth0 inet6 auto
Also apparently ifupdown should already support IPv6 DHCP, but it still needs a DHCP client (and udhcpd only provides IPv4 DHCP). FWIW the interfaces file line is:
iface eth0 inet6 dhcp
Possible alternate options:
dhcpcd-base(a dependency ofdhcpcd) is apparently compatible withifupdown//etc/network/interfacesfile.wide-dhcpv6-client- a DHCPv6 client that also apparently works alongsideifupdownfor IPv6.
I'm not completely against moving to another DHCP client that uses a completely different config, but moving away from using ifupdown//etc/network/interfaces file will require a bit of work elsewhere to make it work with our existing tools - work that I'm not keep to embark on at this late stage of the v19.x dev cycle (& v19.0 is already WAY overdue...). And my above note re Proxmox also needs investigation and consideration.
Options that don't use ifupdown//etc/network/interfaces file:
dhcpcd- as proposed by @marcos-mendez - static interface conf goes in/etc/dhcpcd.conf`.- [
systemd-networkd] - my feelings re systemd are mixed but AFAIK use of networkd would not require any additional packages. It uses.networkfiles, which natively handle both IPv4 and IPv6.
I'd be particularly interested in your thoughts @marcos-mendez.
I'm also not sure what we should do with the changes we made to support IPv6 in Confconsole?! Perhaps we should roll that back for now? I imagine that the changes to IPv6 support in Webmin should be fine as-is?
Replaces: #1459
Activity
marcos-mendez commentedon Apr 13, 2026
Thanks for the detailed writeup @JedMeister . Some context and findings from our side:
The dhcpcd work wasn't speculative
We needed IPv6 working end-to-end to test ejabberd (s2s federation) and FreePBX on IPv6-only containers in our infra. Without it, confconsole reported "not configured" on hosts with valid IPv6 addresses. That's what drove both the dhcpcd change and the confconsole patches.
We already validated dhcpcd-base + ifupdown
The good news: our approach is already compatible with ifupdown. Here's what we found:
ifupdown 0.8.44 (Trixie) declares Recommends: dhcpcd-base | dhcp-client — it natively supports it
We installed dhcpcd, masked the daemon (/dev/null), and ifup invokes it on-demand
/etc/network/interfaces remains the single source of truth
Proxmox LXC static IP injection works unchanged
We later found that inet6 dhcp stanzas are redundant — dhcpcd handles dual-stack (DHCPv4 + SLAAC + DHCPv6) in a single call
So the interfaces file stays simply iface eth0 inet dhcp — dhcpcd does the rest.
If you'd prefer installing only dhcpcd-base instead of the full package (skipping the daemon masking), happy to test and submit a revised PR.
Confconsole
I'd suggest keeping the IPv6 display changes — showing the IPv6 address on the services screen is useful no matter how the address was obtained. The _validip() fix (checking IPv6 when no IPv4 exists) prevents false "not configured" on IPv6-only hosts. We could split the PR if you want: detection/display separate from the dhcpcd retry loop.
Proxmox
Fully agree this is essential — most TKL users today are probably on PVE. Everything we tested preserves /etc/network/interfaces as the config path, so PVE static IP injection works as expected.
Why IPv6 matters for TKL
ISPs are increasingly deploying CGNAT to cope with IPv4 exhaustion — users behind it can't host services or accept inbound connections. IPv6 restores end-to-end connectivity, which is exactly what TKL is about: empowering people to run their own infrastructure. At our cooperative (pop.coop) we run IPv6-first in production and we're happy to keep contributing on this front.
JedMeister commentedon Apr 14, 2026
Thanks @marcos-mendez. I appreciate the context and I'm keen to add "first class" IPv6 support and it sounds like not having it is essentially a "deal breaker" for you. I assume that there will be many others in the same boat...
So I have done a fair bit of testing and I'm pretty sure I've discovered the issue. FWIW I have replaced
dhcpcdwithdhcpd-baseas well. So the first issue is that thenetworking.servicewasn't enabled by default. TBH I'm not sure why that is but it's an easy fix...The next issue I hit was a side effect of DHCP "hanging" at boot - not really hanging, but taking a long time: ~4 secs. I tried configuring
dhcpcdto not block the boot (run in the background) which shaved that ~4 secs off the boot time, but caused a new issue: confconsole starts before the network config is complete so it thinks that it doesn't have a network connection (because it doesn't at that point).After about 4 hours of diagnosis and testing I've worked out what the actual problem is.
dhcpcdis taking ages doing an ARP probe to double check that the IP it has leased/cached isn't already taken. Removing the cached lease resolved that, but that's not a "proper" fix because it essentially defeats the whole point of DHCP leases in the first place... After burning so much time I didn't go too far down the rabbit hole trying to work out why the ARP probe takes so long, but it does seem to be some sort of bug in my local router's DHCP server.A bit more reading lead me to understand why it didn't cause an issue before;
udhcpddoesn't do the ARP probe by default! That makes it quicker but technically non-compliant with RFC 5227.dhcpcdis RFC-compliant so it's actually doing the "right thing" and exposing an issue with my router that was always there - just wasn't visible.My guess is that on your setup @marcos-mendez - your DHCP server responds to the ARP much quicker hence why you didn't see the issue on your end? My router is a higher end "consumer grade" one with pretty good hardware specs and AFAIK it uses
dnsmasqas it's DHCP server. So I'm a bit surprised about the issue. Without knowing more about how widespread this issue is I'm not 100% sure how common it will or how much friction it might cause for our users?The TL;DR is that my inclination is to disable the ARP probe in
dhcpcdconfig. That will keep the same behavior as we had (withudhcpd) for the last ~14 years. And it won't add to our (i.e. @OnGle and my) dev friction. Fingers crossed that will work for you @marcos-mendez!?marcos-mendez commentedon Apr 14, 2026
Hey Jed, before you continue your investigation I suggest you try Hurricane Electric's Tunnel Broker. It gives you a proper IPv6 /64 over a 6in4 tunnel — dead simple to set up and tear down.
Here's a small script I use on my workstation (Manjaro, over a VPN interface). You can adapt it to your setup easily:
This is essentially how SLAAC works in most real-world deployments. If you have a static public IPv4, you can also test this in an environment with standard RA (Router Advertisement) or even BGP — that would let you rule out your router's behavior as the source of the issue once and for all.
Even enterprise-grade networking gear has its quirks and bugs. A clean HE tunnel gives you a known-good IPv6 path to test against, independent of whatever your local router is doing.
Note: Replace these configuration values with the ones Hurricane Electric gives you when you create your own tunnel:
You can find all of these on the Tunnel Details page after creating your tunnel at https://tunnelbroker.net/. The
VPN_IFshould be changed to whatever interface has your public IPv4 (e.g.eth0,enp0s3, etc.) — I usetun0because I run it over a VPN.marcos-mendez commentedon Apr 14, 2026
With this script probably is gonna take you 10 minutes more
JedMeister commentedon Apr 16, 2026
Hey @marcos-mendez thanks mate. I'm going to have to circle back to this when I've got a bit more headspace.
As for this issue itself - IMO it's closed by the implementation in turnkeylinux/common#345. 🎉
@marcos-mendez - If you still think that there's other IPv6 related stuff to do please open a fresh issue (or 2). 😁
JedMeister commentedon Apr 24, 2026
Unfortunately, while testing I have hit more issues re this "first class" IPv6 implementation.
As discussed,
dhcpcd-basedoes not "clash" withipupdownand/etc/network/interfaces- at least not technically. Without the "full"dhcpcdpackage (and the daemon/service)dhcpcdis (somewhat) controlled byifup/ipdownin the sense that it will stop/startdhcpcd- release/renew interface DHCP lease/s.However during further testing I discovered that
dhcpcdcompletely ignores the config in/etc/network/interfacesso does not respect 'static' IP config and continues to get a DHCP lease. That does not actually break the static IP config and it will still work. However it means that you end up with an interface that has multiple IPs. While technically that is still "valid" config, it would certainly be unexpected behavior for most - if not all - users. An additional unexpected/unknown IP address on a network when a TKL server is explicitly configured to use a static IP may lead to concern and/or time wasted trying to work out what is going on. And possibly increase security risks.I went down a rabbit hole developing code to resolve that issue and get the same behavior we had previously with
udhcpd- i.e. a DHCP or a static IP. I ended up with a partially complete, complex and fragile solution that I wasn't really happy with.I seriously considered winding back the IPv6 implementation (again) so I can get back to the last few bits blocking v19.0rc1 release. Then hopefully circle back to IPv6 stuff with hope of including in the stable release. However, I decided to spend a little more time on it.
In an effort to avoid falling into the "sunk cost" fallacy I completely stepped back from the approach I had been taking. After spending a couple of hours thinking, researching and re-evaluating the whole situation I thought I'd come up with a quite elegant and robust solution using ifupdown hook scripts (a pre-up script and a post-down script). But it's not working how it should - according to the docs there should be some environment vars but they aren't being set... :( And I'm still not sure why?!
I haven't given up yet, but I've now burned another week trying to get it working as it should so if I can't get it working properly soon I'm going to have to consider winding back the IPv6 changes until we can work it out... I'll have a look with some fresh eyes on Monday and see how I go...
marcos-mendez commentedon Apr 24, 2026
Sorry for the delay mate we had a Holiday this week, let me take a look into this and i'll come back to you.
marcos-mendez commentedon Apr 24, 2026
Hey @JedMeister — took a closer look at the repo before I reply properly. A couple of things that might save you time:
ifupdown-ng, not classic ifupdown. PR (Jessie) TKLDev SSL crash on make #344 landed right before the dhcpcd work, so the system you're debugging is running ifupdown-ng. Its hook model is different — it uses method executors under
/usr/libexec/ifupdown-ng/, and while the /etc/network/if-*.d/ hook dirs still fire, the env vars the compat layer exposes aren't a 1:1 match with the classic ifupdown docs (which is likely what you've been
reading). That would explain why IFACE/METHOD/ADDRFAM/PHASE aren't showing up the way you expect. Quick confirmation: drop env > /tmp/hook-env.log at the top of your pre-up script, run ifup --verbose eth0, and
see what's actually there. Authoritative reference is man interfaces-ng(5) and /usr/share/doc/ifupdown-ng/.
Consider sidestepping hooks entirely. Since the real goal is "don't let dhcpcd touch interfaces that are configured static", you can solve it at build/boot time instead of runtime hooks — extend
conf/turnkey.d/networking to parse /etc/network/interfaces and append denyinterfaces to /etc/dhcpcd.conf for every inet static stanza. No hook env vars, no executor quirks, and it's trivial to test.
Cleaner than the pre-up/post-down approach and doesn't depend on ifupdown-ng internals that might shift under us later.
Fallback if the above isn't enough. dhcpcd has its own hook system (/etc/dhcpcd.enter-hook, /etc/dhcpcd.exit-hook, /lib/dhcpcd/dhcpcd-hooks/) with its own env vars ($interface, $reason, $new_ip_address)
that dhcpcd itself sets reliably — independent of whatever ifupdown/ifupdown-ng is doing.
Happy to dig in further if you can push the WIP branch (or paste the hook script + current dhcpcd.conf + interfaces). Also re your router's slow ARP — if you want to rule it out as a variable while debugging,
the HE tunnel I shared earlier gives you a clean IPv6 path in ~10 min.