How to enable IPv6 on CentOS 6

24x7CSM

Well-known member
Registered
Joined
Sep 27, 2016
Messages
263
Points
28
Login to your server with root user

You need to update and configure following files for IPv6 configuration:

/etc/sysconfig/network : Turn on networking in this file.

/etc/sysconfig/network-scripts/ifcfg-eth0 : Set default IPv6 router IP and server IP address in this file.

Open /etc/sysconfig/network file, enter:

# vi /etc/sysconfig/network

Append following line:

NETWORKING_IPV6=yes

Open /etc/sysconfig/network-scripts/ifcfg-eth0 (1st network config file)

# vi /etc/sysconfig/network-scripts/ifcfg-eth0

Append following config directives for IPv6:

IPV6INIT=yes
IPV6ADDR=<IPv6-IP-Address>
IPV6_DEFAULTGW=<IPv6-IP-Gateway-Address>

Save and close the file. Restart networking:

# service network restart

Verify your configuration by pinging ipv6 enabled site such as ipv6.google.com:
$ ping6 ipv6.google.com
 

Mujkanovic

Well-known member
Collaborate
Registered
Joined
Apr 24, 2016
Messages
424
Points
18
I have IPv6 on my server but I almost ignored it because I don't know how or when to use it.
If enabled IPv6, where should I use it? and any benefits of IPv6?
 

myresellerhome

Well-known member
Registered
Joined
Jan 21, 2022
Messages
85
Points
6
Hey there!

If you do not have an IPv6 address assigned, the first step is to send an email to support in order the get the required information.
Step 1: Log in to your server
Open a terminal and log in to your server using SSH.
$ ssh root@ip_address_or_domain
Step 2: Open your network interface
Open your network interface file with your favorite editor. We have used nano in our example. The command below will open an empty file to create the eth1 interface.
$ sudo /etc/sysconfig/network-scripts/ifcfg-eth1
Step 3: Add the IPv6 to your network configuration
Use the information from step 1. Add a new block to the end of the file for the IPv6 interface. It should look like the configuration below. Replace the text with your own configuration. Save it once you have added the IPv6 block.
DEVICE="eth1"
ONBOOT="yes"
BOOTPROTO="static"
IPV6INIT="yes"
IPV6ADDR="2a00:7b80:451:1::XXX/48"
451
:1::
XXX
/48"
The red marked number is the VLAN id which is used. The VLAN of this IPv6 is VLAN 451.
Step 4: Restart the network service
You have a few options to enable IPv6. The easiest way is to restart the networking service. You can use the commands below to restart the network service.
$ sudo /etc/init.d/networking restart
Step 5: Test IPv6
The final step is to check whether the configured IPv6 is working. If your own working station is supporting IPv6 you can test it through your terminal. You can find the commands below per Operating System
Windows:
$ ping -6 2a00:7b80:451:1::8
Linux:
$ ping6 2a00:7b80:451:1::8
MacOS:
$ ping6 2a00:7b80:451:1::8
Conclusion
Congratulations! You have now successfully configured your IPv6 address on CentOS 6.
 
Newer Threads
Replies
12
Views
4,871
Replies
2
Views
7,522
Replies
7
Views
5,215
Latest Threads
Replies
1
Views
25
Replies
0
Views
180
Replies
1
Views
39
Replies
2
Views
81

Latest postsNew threads

Latest Hosting OffersNew Reviews

Sponsors

Tag Cloud

You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an alternative browser.

Top