Ubuntu: Can only add 1024 additional IPv6 addresses

Hi,
This one has me stumped. Ubuntu 22.04 LTS. Whether configured using networkd or netplan, adding 10K IPv6 addresses for outbound routing results in only 1024 of them coming up.
I must be hitting a limit somewhere, but I do not know where - any ideas from the community, please?
We disable IPv4 and explicitly want > 1024 IPv6 addresses for outbound connectivity.
Thanks,
DSG

2 Replies

I deployed a fresh Ubuntu 22.04LTS Linode and disabled Network Helper in order to test this out. This blog post suggests that the following process files are responsible for setting the maximum number of assignable IPv6 addresses:

  • /proc/sys/net/ipv6/conf/$INTERFACE/max_addresses
  • /proc/sys/net/ipv6/conf/all/max_addresses

I checked these files after my first boot and they both displayed 16 as the default IPv6 assignable value. Personally, I've never attempted to add so many static IPv6 addresses to any one Linode or device, but I was able to find forum discussion about how to assign a full /64 range (what we assign) to netplan in Ubuntu and Debian:


If this is how you have already explored assigning that many addresses, we could use some more information about your setup and use-case.

  • How did you attempt to assign that wide of an address pool?
  • How were you able to determine the specific IPv6 addresses that were functional?
  • Of those functional addresses, were they sequentially functioning up until the 1025th address or were there gaps between IP addresses?
  • What value is currently in your /proc/sys/net/ipv6/conf/eth0/max_addresses file, and had you previously modified this file in any way?

We have the same issue on Ubuntu 24.04 LTS:

How did you attempt to assign that wide of an address pool?

  • Trying to add 20,000 addresses - it works fine if adding manually, for example ip -6 addr add a:b:c:d:e:f:g:0/64 dev eth0

How were you able to determine the specific IPv6 addresses that were functional?

  • Choosing from an assigned /64 range
  • ip a|grep inet6 | grep -v \/128|grep -v a:b::c:d:e:f|grep -v fe80::a:b:c:d|wc -l returns 1024

Of those functional addresses, were they sequentially functioning up until the 1025th address or were there gaps between IP addresses?

  • Random addresses from the /64

What value is currently in your /proc/sys/net/ipv6/conf/eth0/max_addresses file, and had you previously modified this file in any way?
16 and no

We get the same whether defining the addresses in /etc/systemd/network/05-eth0.network or /etc/netplan/01-netcfg.yaml, but we are able to assign 20,000 by adding the addresses manually. However, after a time, they inexplicably disappear.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct