Netplan has no option to enable dhcpv6 prefix delegation like ifupdown did

Bug #1771886 reported by Bryce Larson
184
This bug affects 35 people
Affects Status Importance Assigned to Milestone
Netplan
Triaged
Wishlist
Unassigned

Bug Description

When using ifupdown, you can put 'request_prefix 1' in order to specify for dhclient to request an dhcpv6 prefix delegation. I also understand that systemd-networkd also supports this, see https://github.com/systemd/systemd/issues/1080 If netplan is to fully replace ifupdown feature for feature, it needs to support this functionality as I am using that feature with ifupdown and cannot upgrade to netplan without it.

I understand from the netplan.io website that you guys want cases like this to be reported here. Let me know if that is not the case or if there is a better place to put things like this.

Revision history for this message
Bryce Larson (bryceml) wrote :

Another thing that relates to this is the ability to specify what the duid is that is sent in the dhcpv6 request. If I recall correctly systemd-networkd offers the ability to specify the duid.

Revision history for this message
Ryan Harper (raharper) wrote :

Hi Bryce,

Thanks for taking the time to report this issue.

netplan doesn't yet support setting dhcpv6 prefix delegation. Thanks for the link.

The relevant networkd sections are available and documented here:

https://www.freedesktop.org/software/systemd/man/systemd.network.html

IPv6PrefixDelegation=

[IPv6PrefixDelegation] Section Options

We'll need to see what, if any support for this there is in NetworkManager and then determine what key/values to use to control and then add support to the backend renders.

W.r.t the DUID, networkd currently sends an RFC4361-compliant Client ID, which is the combination of IAID and DUID; this is generated automatically by systemd. If you need to override this value currently you need to create a global override to /etc/systemd/network.conf, details here.

https://www.freedesktop.org/software/systemd/man/networkd.conf.html#

That's not currently modeled in the yaml or backends either.

Changed in netplan:
status: New → Confirmed
Revision history for this message
Wladimir Mutel (mwg) wrote :

1 year has definitely passed since the release of Ubuntu 18.04
netplan had been updated through 0.36 -> 0.40 -> 0.97 -> 0.98
any progress in supporting dhcp6-pd there ???

Revision history for this message
John Ioannidis (ubuytu) wrote :

It's now 2020. I really have to ask: who writes networking software, let alone making it the default, and does not consider fully-supporting IPv6 a requirement?

Revision history for this message
John Ioannidis (ubuytu) wrote :

When will this be fixed? Why was netplan made the default when it does not have feature parity with ifupdown? Why is this question being ignored?

Revision history for this message
Konstantin Novitsky (novitk) wrote :

+1
Gave up on Ubuntu in a router/network appliance space due to this. Sure, I can remove netplan and use ifupdown, but why bother when openwrt just works!

Revision history for this message
Wladimir Mutel (mwg) wrote :

Fortunately, with systemd-networkd + wpa_supplicant you could go without any of {netplan, ifupdown, NetworkManager} on both modern Ubuntu or modern Debian. As you may imagine, netplan is just a frontend generating ("rendering") configs for one of possible backends within {networkd, NetworkManager}. So you just copy /run/systemd/network/* into /etc/systemd/network/ , after which you may remove all netplan and related packages and go ahead with systemd-networkd only (which, unfortunately, is nailed to the core of modern Linuxes pretty firmly and not that easily detachable).

Revision history for this message
David Burrow (dnburrow) wrote :

Would still love to see IPv6-PD implemented in netplan.

Revision history for this message
DanyChen (danychen) wrote :

I have this problem too, netplan has so many ancient bugs that are still open, I don't know why ubuntu integrate netplan, why don't make cloud-init just write networkd config files.

Revision history for this message
Avamander (avamander) wrote :

Well this is an annoying bug, makes netplan useless for the biggest IPv6 ISP in the country.

tags: added: rookie-mistake
Lukas Märdian (slyon)
tags: added: fr-1731
Changed in netplan:
importance: Undecided → Wishlist
Revision history for this message
Mike Borsetti (mborsetti) wrote :

Ugly workaround until this bug is fixed, but this seems to work with Ubuntu 20.04.3 LTS and 21.04. It's executed at startup, e.g. from rc.local, as root; br0 in this case is the interface to a WAN network so adapt to your system before running.

echo "IPv6SendRA=yes" >> /run/systemd/network/10-netplan-br0.network
echo "DHCPv6PrefixDelegation=yes" >> /run/systemd/network/10-netplan-br0.network
echo "IPv6PrivacyExtensions=yes" >> /run/systemd/network/10-netplan-br0.network
systemctl restart systemd-networkd
/usr/lib/systemd/systemd-networkd-wait-online

Yes, it's ugly and am sure breaks a whole lot of Netplan's goals, but at this point is Netplan that breaks the goal of having a prefix-delegated network so it's a (much) lesser evil IMHO.

Revision history for this message
Lukas Märdian (slyon) wrote (last edit ):

A more elegant way to implement this workaround would probably be to put that configuration snippet into a drop-in override (as described here https://www.freedesktop.org/software/systemd/man/systemd.network.html), e.g.:

$ cat /etc/systemd/network/10-netplan-br0.network.d/override.conf
[Network]
IPv6SendRA=yes
DHCPv6PrefixDelegation=yes
IPv6PrivacyExtensions=yes

Revision history for this message
Mike Borsetti (mborsetti) wrote (last edit ):

Lukas,

Thank you!

For the benefit of others, the drop-in file must have appropriate section headers, so the correct file is as follows:

$ cat /etc/systemd/network/10-netplan-br0.network.d/ipv6_pd_ra.conf
[Network]
IPv6SendRA=yes
DHCPv6PrefixDelegation=yes

If the ISP gives you a /60 (or /48, /52, /56) prefix delegation on request, and you want one, then the following works (ISP-specific, YMMV):

$ cat /etc/systemd/network/10-netplan-enp1s0.network.d/ipv6_pd.conf
[DHCPv6]
PrefixDelegationHint=::/60

Lukas Märdian (slyon)
Changed in netplan:
status: Confirmed → Triaged
Revision history for this message
Sifr Moja (simplexion) wrote :

Why is the importance of this set to wishlist? Why is IPv6 seen as a second class citizen in this?

Revision history for this message
Erik Nygren (erik+ubuntu) wrote :

The version of systemd-networkd in Ubuntu 22.04 makes substantial improvements to DHCPv6-PD support and addresses lots of the shortcomings in 20.04. I've written up some details on how to configure this via overrides:

https://erik.nygren.org/dhcpv6-pd-on-ubuntu-2204.html

It would be vastly preferable if this was just exposed via netplan.
Note that the syntax of the configuration changed in recent versions of systemd-networkd (ie, some things moved into distinct stanzas).

Revision history for this message
Mike Borsetti (mborsetti) wrote :

Hi Erik,

Great write-up (thanks!).

Just as an FYI, going through it I found that it includes the "ForceDHCPv6PDOtherInformation" directive, which is not a known networkd directive per https://www.freedesktop.org/software/systemd/man/systemd.network.html. Indeed it has been deprecated per https://github.com/systemd/systemd/issues/22493.

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.