Technical Blog | 技術博客


[Original] Configure IPV6 for the server


With the increasing use of IPV6, for example, current blogs have been supported and built on IPV4 and IPV6.
But many servers still only have IPV4, so we are all looking for ways to make our servers support IPV6.
I have published this original article in the [[经验] [原创+补坑]IPV6在服务器上的配置教程] through the Chinese language, and today I am willing to update it to my blog.

Let’s start configuring

1、Ready to use IPV6

①. You need understand IPV6 and know about IPV6.
②. have your IPV6 address / IPV6 address block (buy through the service provider or Tunnelbroker)
③. a server (Dedicated server or VPS are OK)
④. want to use IPV6

2、Check the server’s 2 configuration files

(If you don’t have Vim, please install it first. yum install vim -y)

①. (network settings file) Modify / add the following
vim /etc/sysconfig/network


②. (network card settings file) Modify / add the following
vim /etc/sysconfig/network-scripts/ifcfg-eth0


3、Set the IPV6 module to start automatically

chmod +x /etc/rc.d/rc.local
vim /etc/rc.d/rc.local

4、Add/modify content on self-starting files

①. Suppose you have 4 IPV6 addresses

ip addr add [IPV6 address1] dev eth0
ip addr add [IPV6 address2] dev eth0
ip addr add [IPV6 address3] dev eth0
ip addr add [IPV6 address4] dev eth0

②. Setting up routing

ip -6 route add [IPV6 gateway address] dev eth0
ip -6 route add default via [IPV6 gateway address]

5、Test whether IPV6 is successful


Check the results, and the following results are similar to the IPV6 configuration, you can enjoy the IPV6 world.

[[email protected] ~]# ping6
PING (2400:cb00:2048:1::6818:6cf8)) 56 data bytes
64 bytes from 2400:cb00:2048:1::6818:6cf8 (2400:cb00:2048:1::6818:6cf8): icmp_seq=1 ttl=61 time=1.91 ms
64 bytes from 2400:cb00:2048:1::6818:6cf8 (2400:cb00:2048:1::6818:6cf8): icmp_seq=2 ttl=61 time=2.13 ms
64 bytes from 2400:cb00:2048:1::6818:6cf8 (2400:cb00:2048:1::6818:6cf8): icmp_seq=3 ttl=61 time=2.14 ms
64 bytes from 2400:cb00:2048:1::6818:6cf8 (2400:cb00:2048:1::6818:6cf8): icmp_seq=4 ttl=61 time=1.90 ms
— ping statistics —
4 packets transmitted, 4 received, 0% packet loss, time 3026ms
Rtt min/avg/max/mdev = 1.906/2.024/2.146/0.120 ms

Enjoy the IPV6 world

You have completed the configuration of your server IPV6.

[Technical Blog | Technology Blog] Telegram exchange channel: (TG discussion group please pay attention to TG channel top message)

This article was posted on the [CXT] Technical Blog | 技術博客, if you need to forward the share, please indicate the source.

[Original] Configure IPV6 for the server