[systemd-devel] IPv6 dhcp-acquired prefix delegation?

John Ioannidis systemd-devel at tla.org
Sun May 17 00:39:24 UTC 2020


I am running systemd v241, the one that comes with debian-10.

Is the following scenario possible natively (that is, without using a
standalone dhcpv6 client)?


   - My residential ISP will normally hand me a /64, but will give me a /56
   if I ask for it. While technically not a statically-allocated prefix, it
   changes very rarely: I had had the same prefix for over three years until I
   started experimenting with systemd-networkd and killed my old lease files.
   - I have several local vlans, and I want to give a different /64 to each
   one of them, but if the prefix I get from upstream changes, I want them to
   automatically renumber.
   - I'm perfectly happy relying on SLAAC for the local vlans, but I'm not
   against having to also run a dhcpv6 server to hand out addresses and things.

My previous solution, using ifupdown instead of systemd was this:

   1. dhcpv6 client with -P --prefix-len-hint 56, which gets the /56 and
   the default route.
   2. A script in /etc/dhcp/dhclient-exit-hooks.d/ that builds an
   /etc/radvd.conf file with bits 56-63 appropriately numbered, and then
   restarts radvd.

I have been totally unable to reproduce this behavior with pure networkd;
in fact, I cannot even get a dhcpv6 session going. I do not want to rely on
RAs from upstream, just DHCPv6. Here is a minimal .network file for the
external interface ("ethwan")

[Match]
Name=ethwan

[Network]
DHCP=yes
IPForward=yes
IPMasquerade=no
IPv6PrivacyExtensions=no
IPv6AcceptRA=no

[DHCP]
UseDNS=no
UseNTP=yes
UseRoutes=yes
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20200516/51e0e796/attachment.htm>


More information about the systemd-devel mailing list