[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: systemd-networkd: IPv6 prefix delegation lost when changing prefixes



Hi Tobias,

I've had the same Issue here delegating prefixes to my VPN-Gateway in my
home-hetwork.

My solution back then was to ditch systemd-networkd for this setup and
rely on configuring dhcpcd and radvd accordingly. Systemd's
DHCP-implementation seems to a little bit out of whack, depending on the
version.

Unfortunately that VPN-Gateway got decommissioned and I don't have a
backup of those two config-files. If I remember right, I kept the config
close to what the ArchLinux-Wiki suggests.

YT, VT.

On 4/10/20 1:34 PM, Tobias Brink wrote:
> Hello debian-user,
> 
> I have an internet connection via a router provided by my ISP. I have a
> Linux box (Debian Buster) between this router and my internal network in
> order to provide nicer firewalling and some services like OpenVPN, wifi
> for guests without access to the internal network, and so on.
> 
> In order to provide IPv6 to my internal network, I use IPv6 prefix
> delegation to get a prefix from the ISP-provided router. That works and
> my systemd-networkd (systemd version 244.3-1 from backports) config
> files look somewhat like this:
> 
> #/etc/systemd/network/10-enp3s0.network <- the "external" interface
> 
> [Match]
> Name=enp3s0
> 
> [Network]
> Address=<some RFC1918 IPv4 address>
> Gateway=<IPv4 gateway>
> Address=fdxx:xxxx:xxxx:xxxx::1/64
> IPv6AcceptRA=yes
> DHCP=ipv6
> IPv6PrivacyExtensions=true
> 
> [DHCPv6]
> ForceDHCPv6PDOtherInformation=yes
> 
> 
> #/etc/systemd/network/20-br0.network <- the "internal" interface
> 
> [Match]
> Name=br0
> 
> [Network]
> Address=<some RFC1918 IPv4 address>
> Address=fdxx:xxxx:xxxx:yyyy::1/64
> IPv6PrefixDelegation=yes
> 
> [IPv6PrefixDelegation]
> Managed=yes
> OtherInformation=yes
> RouterLifetimeSec=7200
> EmitDNS=yes
> DNS=fdxx:xxxx:xxxx:yyyy::1
> DNSLifetimeSec=7200
> 
> [IPv6Prefix]
> Prefix=fdxx:xxxx:xxxx:yyyy::/64
> ValidLifetimeSec=7200
> PreferredLifetimeSec=3600
> 
> 
> That works quite nicely and I get both ULA addresses and some dynamic
> prefix from my ISP for the internal net. Unfortunately, whenever the
> public IPv6 prefix changes [enforced nightly by the ISP :-( ] the prefix
> delegation is lost and I only retain IPv4 and the ULA addresses on my
> internal network. The external interface enp3s0 gets a new public IPv6
> address without trouble, though. Debug logs from systemd-networkd
> contain the following at the relevant time (nothing else relevant,
> though):
> 
>  DHCPv6 CLIENT: Sent RENEW
>  DHCPv6 CLIENT: Next retransmission in 9s
>  DHCPv6 CLIENT: REPLY Status Binding unavailable
> 
> It seems that the built-in DHCPv6 client of systemd tries to renew the
> old prefix and is denied. It does not seem to request a new prefix. Does
> anybody have some experience with this? Is this a bug in
> systemd-networkd or the ISP-provided router? Some other problem?
> 
> It is also a bit annoying to implement a workaround. While "networkctl
> reconfigure enp3s0" does the trick and gets a new delegated prefix, I am
> not sure how to automate this command. There seems to be no tool to show
> the delegated prefixes, so I cannot find out when they are lost. Does
> somebody have an idea?
> 
> Any help appreciated.
> 
> Tobias
> 

Attachment: signature.asc
Description: OpenPGP digital signature


Reply to: