IPv6 Prefix Delegation using NetworkManager

If your ISP supports IPv6 and assigns the IP address of your eth0 interface via DHCPv6 you may also be able to obtain one or more additional IPv6 prefixes. These prefixes can be used for other interfaces eth1 or eth2 but also for any virtual interfaces such as docker0, virbr0 and podman0 used for containers or VM’s running on your system.

In NetworkManager, find the connections you are interested in:

Ensure that the interface to your ISP is set to use dhcpv6:

If not, modify it to use dhcp

Now you need to tell NetworkManager which interface to assign the delegated prefix from your ISP. Sadly NetworkManager will only ask for one prefix to be delegated. As a result, only one device can be told use it. Here, the podman cni bridge “cni-podman0” is setup to have the delegated prefix assigned to it.

The magic in Linux which allows this to work are the sysctl values related to IPv6 SLAAC. By default, IPv6 is intended to auto-configure itself on all interfaces:

Now add containers created via podman that run on the “cni-podman0” bridge will obtain IPv6 prefxies which your ISP will recognize.

This entry was posted in IPv6, Networking, Technical Difficulties. Bookmark the permalink.