centos

How to Set IPv6 on CentOS

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

 

File 1. /etc/sysconfig/network
File 2. /etc/sysconfig/network-scripts/ifcfg-eth0
//replace ifcfg-eth0, if your Ethernet port is different. You can find it using ls command inside /etc/sysconfig/network-scripts/

 

Open /etc/sysconfig/network file, enter:

 

You can use nano or vi to do this: nano /etc/sysconfig/network

 

Add/Edit following line:
NETWORKING_IPV6=yes

Save and Exit

 

 

Add/Edit following config for IPv6:
IPV6INIT=yes
IPV6ADDR= Your Primary IPv6 Address
IPV6_DEFAULTGW= Your IPv6 Gateway

Save and Exit

 

Restart networking:
service network restart

 

Now you can Verify:
ping6 ipv6.google.com

 

Sample Output:

 

[root@host ~]# ping6 ipv6.google.com
PING ipv6.google.com(maa03s18-in-x0e.1e100.net (2404:6800:4007:805::200e)) 56 data bytes
64 bytes from maa03s18-in-x0e.1e100.net (2404:6800:4007:805::200e): icmp_seq=1 ttl=55 time=48.9 ms
64 bytes from maa03s18-in-x0e.1e100.net (2404:6800:4007:805::200e): icmp_seq=2 ttl=55 time=48.7 ms
64 bytes from maa03s18-in-x0e.1e100.net (2404:6800:4007:805::200e): icmp_seq=3 ttl=55 time=48.6 ms
64 bytes from maa03s18-in-x0e.1e100.net (2404:6800:4007:805::200e): icmp_seq=4 ttl=55 time=48.7 ms
64 bytes from maa03s18-in-x0e.1e100.net (2404:6800:4007:805::200e): icmp_seq=5 ttl=55 time=48.8 ms
64 bytes from maa03s18-in-x0e.1e100.net (2404:6800:4007:805::200e): icmp_seq=6 ttl=55 time=48.7 ms
64 bytes from maa03s18-in-x0e.1e100.net (2404:6800:4007:805::200e): icmp_seq=7 ttl=55 time=48.7 ms
64 bytes from maa03s18-in-x0e.1e100.net (2404:6800:4007:805::200e): icmp_seq=8 ttl=55 time=48.6 ms

 

If your output look like this. You are done. 🙂

No Comments

Sorry, the comment form is closed at this time.