Configure your routed /48 IPv6 prefix
A server comes with a routed /48 IPv6 subnet, routed to its primary IPv6 address. This guide brings an address from the /48 up on Debian/Ubuntu, CentOS/RHEL, FreeBSD and Windows.
Understanding your IPv6 setup
The examples use a server with the IPv4 address 185.181.60.123:
| Field | Value |
|---|---|
| Primary IPv6 | 2a03:94e0:ffff:185:181:60::123 |
| Prefix length on primary | /118 |
| Default gateway | 2a03:94e0:ffff:185:181:60::1 |
| Routed /48 subnet | 2a03:94e0:abcd::/48 |
Replace 2a03:94e0:abcd::/48 with the routed prefix under Subnets on the server's Network tab.
Linux
Debian / Ubuntu
Open the network interfaces file:
sudo nano /etc/network/interfacesYou should already see the primary IPv6 stanza:
iface eth0 inet6 static
address 2a03:94e0:ffff:185:181:60::123
netmask 118
gateway 2a03:94e0:ffff:185:181:60::1Add an alias interface for an address inside the routed /48:
iface eth0:1 inet6 static
address 2a03:94e0:abcd::1
netmask 48Replace eth0 with your actual interface name (for example ens33, ens160).
Restart networking:
sudo systemctl restart networkingDebian 12+ / Ubuntu 22.04+ with netplan
Edit /etc/netplan/01-netcfg.yaml:
network:
version: 2
ethernets:
ens33:
addresses:
- 2a03:94e0:ffff:185:181:60::123/118
- 2a03:94e0:abcd::1/48
routes:
- to: default
via: 2a03:94e0:ffff:185:181:60::1Apply:
sudo netplan applyCentOS / RHEL
Edit your interface config:
sudo nano /etc/sysconfig/network-scripts/ifcfg-eth0Add the secondary IPv6 address:
IPV6ADDR_SECONDARIES="2a03:94e0:abcd::1/48"Replace eth0 with your real interface name (ens192, eno1, etc.).
Restart the network service:
sudo systemctl restart networkCentOS 8+ / RHEL 8+ with nmcli
nmcli connection modify eth0 +ipv6.addresses 2a03:94e0:abcd::1/48
nmcli connection up eth0FreeBSD
Edit /etc/rc.conf:
sudo nano /etc/rc.confAdd the IPv6 stanzas:
ipv6_ifconfig_em0="inet6 2a03:94e0:ffff:185:181:60::123 prefixlen 118"
ipv6_defaultrouter="2a03:94e0:ffff:185:181:60::1"
ipv6_ifconfig_em0_alias0="inet6 2a03:94e0:abcd::1 prefixlen 48"Replace em0 with your actual interface name.
Restart networking:
sudo service netif restartWindows
Open PowerShell as Administrator and run:
New-NetIPAddress -InterfaceAlias "Ethernet" `
-IPAddress "2a03:94e0:abcd::1" `
-PrefixLength 48 `
-DefaultGateway "2a03:94e0:ffff:185:181:60::1"Replace "Ethernet" with your actual adapter name. Run Get-NetAdapter to list them.
Verify
After reloading, confirm the address is up:
| OS | Command |
|---|---|
| Linux | ip -6 addr |
| FreeBSD | ifconfig |
| Windows | Get-NetIPAddress |
Test connectivity from the new address:
ping6 google.comTIP
Once an address from the /48 is up on your server, the next step for many use-cases (especially mail) is to set reverse DNS (PTR) for it.

