How do I enable addresses from a IPv6 /116 permanently using Netplan?
I'm using Netplan's .yaml files for networking in Ubuntu 18.04. How do I enable additional IP addresses from a /116 IPv6 pool?
Our Static Networking Guide covers most of this process, except for adding additional IPv6 addresses.
Make sure to add your IPv6 SLAAC address as your Primary IPv6 address in the configuration below. Below that, you can add a single /116 from your pool. For example, if my pool is xxx:xxxx::xx:1000 -> xxx:xxxx::xx:1fff I can add the following /128 addresses from this pool:
addresses: - 198.51.100.5/24 # Your public IPv4 address. - 192.168.1.2/17 # Private IPv4 address. - "2001:db8:2000:aff0:xxxx:xxxx/64" # Primary IPv6 address. - "xxx:xxxx::xx:1000/128" # address from my /116 - "xxx:xxxx::xx:1001/128" # additional address - "xxx:xxxx::xx:1098/128" # additional address - "xxx:xxxx::xx:1abc/128" # additional address gateway4: 198.51.100.1 # Primary IPv4 gateway. gateway6: "fe80::1" # Primary IPv6 gateway.
As with all .yaml files, make sure to use spaces and not tabs for indenting.
Save your changes and run:
sudo netplan apply
No reboot is necessary. You can view your configuration by running: