Assigning a static IPv6 address gives your device a permanent, unchanging network identifier. Unlike dynamic addresses that change periodically, static IPv6 addresses remain constant, making them essential for servers, network infrastructure, and services that need reliable accessibility. This guide covers when to use static addressing, how to configure it across different platforms, and best practices to avoid common pitfalls.
Important Note: Android devices don't support DHCPv6, so if you need dynamic addressing for Android clients, you must use SLAAC (Stateless Address Autoconfiguration).
Before configuring static addresses, understand IPv6 address components:
fd00::/8 (equivalent to RFC1918 private IPv4 addresses like 192.168.x.x)fe80:: used only on the local network segmentAll IPv6 subnets must use a /64 prefix length. This is a fundamental requirement of IPv6 architecture - using any other prefix length breaks many IPv6 features including SLAAC and privacy extensions.
2001:db8:1234:5678::10)642001:db8:1234:5678::1)2001:4860:4860::8888 for Google DNS)2001:4860:4860::8844)First, identify your network adapter:
Get-NetAdapter
Note the InterfaceIndex number, then configure the static address:
New-NetIPAddress -InterfaceIndex 10 -IPAddress 2001:db8:1234:5678::10 -PrefixLength 64 -DefaultGateway 2001:db8:1234:5678::1
Configure DNS servers:
Set-DnsClientServerAddress -InterfaceIndex 10 -ServerAddresses ("2001:4860:4860::8888","2001:4860:4860::8844")
Alternatively, use the legacy netsh command:
netsh interface ipv6 set address "Ethernet" 2001:db8:1234:5678::10
netsh interface ipv6 add dnsserver "Ethernet" address=2001:4860:4860::8888
Modern Ubuntu systems use Netplan for network configuration. Edit /etc/netplan/01-netcfg.yaml:
network:
version: 2
ethernets:
eth0:
dhcp4: true
dhcp6: no
addresses:
- 2001:db8:1234:5678::10/64
routes:
- to: ::/0
via: 2001:db8:1234:5678::1
nameservers:
addresses:
- 2001:4860:4860::8888
- 2001:4860:4860::8844
Apply the configuration:
sudo netplan apply
Edit /etc/sysconfig/network-scripts/ifcfg-eth0:
IPV6INIT=yes
IPV6ADDR=2001:db8:1234:5678::10/64
IPV6_DEFAULTGW=2001:db8:1234:5678::1
DNS1=2001:4860:4860::8888
DNS2=2001:4860:4860::8844
Restart networking:
sudo systemctl restart NetworkManager
nmcli con mod "Wired connection 1" ipv6.method manual \
ipv6.addresses "2001:db8:1234:5678::10/64" \
ipv6.gateway "2001:db8:1234:5678::1" \
ipv6.dns "2001:4860:4860::8888,2001:4860:4860::8844"
nmcli con up "Wired connection 1"
If you want to use SLAAC for the prefix but maintain a static host portion, you can configure an IPv6 token. This creates a predictable address while still benefiting from dynamic prefix updates:
sudo nmcli connection modify "Wired connection 1" ipv6.token ::10
This will create addresses like 2001:db8:1234:5678::10 regardless of the prefix advertised by your router.
64sudo networksetup -setv6manual "Ethernet" 2001:db8:1234:5678::10 64 2001:db8:1234:5678::1
sudo networksetup -setdnsservers "Ethernet" 2001:4860:4860::8888 2001:4860:4860::8844
Note on macOS Addressing: By default, macOS uses stable addresses based on the MAC address with privacy extensions disabled. The address marked as "global dynamic" in the interface will remain constant unless you change network hardware or networks, effectively serving as a static address for most purposes.
Most home routers provide a web interface for IPv6 configuration:
WAN Configuration: If your ISP provides static IPv6:
/64 for WAN, /48 or /56 for delegation)LAN Configuration: Assign IPv6 to your local network:
/48 or /56 from your ISP, divide it into multiple /64 subnets/64 subnet to each LAN interfaceIf your ISP delegates 2001:db8:1200::/56, you can create 256 /64 subnets:
2001:db8:1200:0::/642001:db8:1200:1::/642001:db8:1200:2::/64For advanced routing scenarios, configure static IPv6 routes:
Cisco/Network Equipment:
ipv6 route 2001:db8:2000::/48 2001:db8:1234:5678::2
Linux:
sudo ip -6 route add 2001:db8:2000::/48 via 2001:db8:1234:5678::2
Windows PowerShell:
New-NetRoute -DestinationPrefix "2001:db8:2000::/48" -NextHop "2001:db8:1234:5678::2" -InterfaceIndex 10
Popular public IPv6 DNS servers:
2001:4860:4860::8888 and 2001:4860:4860::88442606:4700:4700::1111 and 2606:4700:4700::10012620:fe::fe and 2620:fe::9When running a server with a static IPv6 address, create AAAA records in your DNS zone:
www.example.com. IN AAAA 2001:db8:1234:5678::10
mail.example.com. IN AAAA 2001:db8:1234:5678::20
For server deployments, configure reverse DNS. IPv6 reverse DNS uses the ip6.arpa domain. For 2001:db8:1234:5678::10, the reverse zone would be:
0.1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.8.7.6.5.4.3.2.1.8.b.d.0.1.0.0.2.ip6.arpa. IN PTR server.example.com.
Contact your ISP or hosting provider to configure reverse DNS records.
SLAAC (Stateless Address Autoconfiguration) automatically assigns IPv6 addresses based on Router Advertisements. When using static addresses, follow these guidelines to prevent conflicts:
Reserve Static Address Range: Use the upper portion of your /64 subnet for static addresses:
2001:db8:1234:5678::/64 (lower addresses)2001:db8:1234:5678::ff00/120 to ::ffff (upper addresses)Disable SLAAC on Static Devices:
ipv6.method manual in NetworkManagerConfigure DHCPv6 Exclusions: If running DHCPv6, exclude your static address range from the DHCP pool
Document Static Assignments: Maintain an inventory of static addresses to prevent accidental conflicts
Use Unique Interface Identifiers: Don't use common patterns like ::1 (reserved for loopback), ::2, ::3 for static hosts - these might conflict with SLAAC-generated addresses
Many networks successfully run both SLAAC and static addressing:
Configuring a web server with static IPv6:
2001:db8:1234:5678::80 (::80 suggests HTTP service)Apache Configuration:
Listen [2001:db8:1234:5678::80]:80
Listen [2001:db8:1234:5678::80]:443
Nginx Configuration:
listen [2001:db8:1234:5678::80]:80;
listen [2001:db8:1234:5678::80]:443 ssl;
For remote administration servers:
/etc/ssh/sshd_config:ListenAddress ::
AddressFamily any
Database servers benefit from static addressing for application configuration:
listen_addresses = '*' in postgresql.confbind-address supports :: or specific IPv6 addressFor Docker, Kubernetes, or virtual machine environments:
After configuring your static IPv6 address, verify connectivity:
Check Interface Configuration:
# Linux
ip -6 addr show
# macOS/BSD
ifconfig
# Windows
ipconfig
Test Connectivity:
# Ping Google's IPv6 DNS
ping6 2001:4860:4860::8888
# Trace route
traceroute6 google.com
# Test DNS resolution
nslookup -type=AAAA google.com
Visit test-ipv6.run for comprehensive IPv6 connectivity testing. This tool will:
The site runs all tests directly in your browser, providing immediate feedback on your IPv6 configuration quality.
/64Static IPv6 addressing is essential for servers, infrastructure, and services requiring consistent network identity. While dynamic addressing with SLAAC or DHCPv6 works well for client devices, static configuration provides the reliability needed for production services.
By following platform-specific configuration steps, avoiding SLAAC conflicts, and properly configuring DNS, you can successfully deploy static IPv6 addressing in any environment. Always verify your configuration with testing tools like test-ipv6.run to ensure full connectivity and optimal performance.
Remember that IPv6 is designed to coexist with IPv4 in dual-stack configurations, so maintaining both protocols during the transition period is recommended for maximum compatibility.