How to configure IPv6
Quick answer
Add the IPv6 address alongside your existing IPv4 configuration: through Netplan on Ubuntu, or nmcli on RHEL-based distributions. Use the address, prefix and gateway exactly as supplied for your server.
IPv6 is configured alongside your existing IPv4 setup, not instead of it. The steps below cover current LTS-style releases: Ubuntu using Netplan, and RHEL-based distributions (AlmaLinux, Rocky Linux, RHEL 8/9) using nmcli. Debian typically uses ifupdown (/etc/network/interfaces) instead of Netplan; the same address, prefix, and gateway values apply there too. Configure the address, prefix and gateway exactly as supplied for your server.
Ubuntu (Netplan)
Edit the Netplan configuration
Open the YAML file in /etc/netplan/ (the filename varies by image, for example 01-netcfg.yaml or 50-cloud-init.yaml):
sudo nano /etc/netplan/01-netcfg.yamlAdd the IPv6 address to the addresses list alongside your IPv4 address, and route the default gateway for each address family. Recent Netplan releases no longer use the gateway4 / gateway6 keys, use routes instead:
network:
version: 2
renderer: networkd
ethernets:
enp1s0:
accept-ra: false
addresses:
- 192.168.1.2/24
- 2001:db8:112::2/64
routes:
- to: default
via: 192.168.1.1
- to: default
via: 2001:db8:112::1
nameservers:
addresses:
- 9.9.9.9
- 1.1.1.1The example uses 2001:db8:112::/64, a prefix reserved for documentation, so it will never be your real subnet. Replace it with the values supplied for your server. The two resolvers shown are well-known public ones, included so the config is complete and testable. Use a public resolver you trust, or leave DNS on the default your server already provides. See Worldstream DNS servers.
Apply the configuration
sudo netplan trynetplan try applies the configuration, then asks you to confirm it. If you do not confirm within the timeout, it rolls back automatically, so a broken file cannot leave you locked out of your own server. Use sudo netplan apply only when you are certain the file is correct.
RHEL-based distributions (AlmaLinux, Rocky Linux, RHEL 8/9)
Find the connection name
nmcli connection showSet the IPv6 address and gateway
sudo nmcli connection modify "System enp1s0" ipv6.method manual ipv6.addresses 2001:db8:112::2/64 ipv6.gateway 2001:db8:112::1
sudo nmcli connection up "System enp1s0"Verify connectivity
Ping an IPv6 address
ping -6 2001:4860:4860::8888Some older systems still use the separate ping6 command instead of the -6 flag on ping; use whichever your distribution provides.
If ICMPv6 traffic looks blocked or your addresses don't resolve, contact support to confirm the subnet is routed correctly to your server.