Adding IPv6 IP

Apply IPv6 to different distributions

Non-persistent application

 
You will lose this configuration after restarting your VPS
(non-persistent configuration)
Considering that your interface is eth0, the configuration should look something like this:
ip addr add 2001:41d0:401:3100:0000:0000:0000:0002/128 dev eth0
ip -6 route add 2001:41d0:401:3100:0000:0000:0000:0001 dev eth0
ip -6 route add default via 2001:41d0:401:3100:0000:0000:0000:0001 dev eth0
 
 

Persistent application on Debian and derrivatives (Ubuntu, Crunchbang, SteamOS...)

 
File to modify (with sudo privileges) 
/etc/network/interfaces
Considering that your interface is eth0, the configuration to add should look something like this: 
iface eth0 inet6 static
address 2001:41d0:401:3100::2
netmask 128
post-up /sbin/ip -6 route add 2001:41d0:401:3100::1 dev eth0
post-up /sbin/ip -6 route add default via 2001:41d0:401:3100::1 dev eth0
pre-down /sbin/ip -6 route del default via 2001:41d0:401:3100::1 dev eth0
pre-down /sbin/ip -6 route del 2001:41d0:401:3100::1 dev eth0
 
 

Persistent application on Redhat and derivatives (CentOS, ClearOS...)

 
Considering that your interface is eth0, the configuration should look something like this:

File to modify (with sudo privileges) 
/etc/sysconfig/network-scripts/ifcfg-eth0
IPV6INIT=yes
IPV6ADDR=2001:41d0:401:3100::2/128
IPV6_DEFAULTGW=2001:41d0:401:3100::1

File to create (with sudo privileges): /etc/sysconfig/network-scripts/route6-eth0
2001:41d0:401:3100::1 dev eth0
default via 2001:41d0:401:3100::1
 
 

Test the connection

 
To check the configuration, on eth0 for example:
ip -6 addr show eth0

This command should return at least one configured IPv6 address
 
 
 
There are several ways to test the connection. 
We first have to understand that IPv6 has to be enabled on both sides of the connection for IPv6 communication to work.
 
 
 
With this in mind, one possible test is to ping an IPv6 from your VPS:
ping6 ipv6.google.com

Was this answer helpful?

 Print this Article

Also Read

Root Partition is Full

Introduction The system’s root partition (also known as / or slash) is the partition where the...

Setting up rDNS for KVM servers from the client area

How to set up reverse DNS entries for your KVM server IP addressesYou can easily add rDNS from...

Increase IPv4 Limit

Some times your attempt to additional IP's may get failed. As there is an increasingly limited...

Increase IPv4 Limit

Some times your attempt to additional IP's may get failed. As there is an increasingly limited...

Bounceback Email headers and it's meanings

Mostly , If you are running a webhosting business, you will surely heard the term "bounce back" ....

Powered by WHMCompleteSolution