To configure static IPv6 networking under Ubuntu Linux server operating systems,We need to simply edit /etc/network/interfaces file.
First login as root
Open /etc/network/interfaces file
Make a backup and edit the file:
cp /etc/network/interfaces /etc/network/interfaces.backup nano /etc/network/interfaces
Add the following configuration:
### Start IPV6 static configuration iface eth0 inet6 static pre-up modprobe ipv6 address 2604:4500:1:7::2 netmask 64 gateway 2604:4500:1:7::1 ### END IPV6 configuration
Save and close the file.
Add IPV6 name servers:
nano /etc/resolv.conf nameserver 2001:4860:4860::8888 nameserver 2000:4860:4860::8844
Save and close the file. Restart networking:
/etc/init.d/networking restart
Now test IPV6 configuration:
ping6 google.com
We can also run a traceroute:
traceroute6 google.com