How to assign IPv6 on your CentOS server

How to assign IPv6 on your CentOS server

Introduction

IPv6 was developed to counter the long-anticipated problem of IPv4 exhaustion. IPv6 is not only intended to replace IPv4 but also boasts of certain characteristics which are superior to IPv4 address like more efficient routing, directed data flows, simplified network configuration, security and much more.

IPv6 address on Virtual compute nodes from E2E Networks are disabled by default.

By following this brief article to the end, you will be able to assign IPv6 address on your server. Please follow these simple steps to assign IPv6 address on your server.

Step 1: Edit sysctl.conf file

Login into the server as root user and edit the sysctl.conf file. Enter the file in editing mode, we will be using vim editor for this article. You can use any file editor that you want.

# vim /etc/sysctl.conf

Add the following lines at the end of the file.

net.ipv6.conf.default.disable_ipv6 = 0
net.ipv6.conf.all.disable_ipv6 = 0

Then save and exit the file.

Step 2: Edit network file

Next, we need to edit the network file which is under the path /etc/sysconfig/

# vim /etc/sysconfig/network

Add the following line at the end of the file.

NETWORKING_IPV6=yes

Then save and exit the file.

Step 3: Edit ifcfg-eth0 file

The last file we need to edit is the ifcfg-eth0 file under the path /etc/sysconfig/network-scripts/

# vim sysconfig/network-scripts/ifcfg-eth0

Append the following lines to the file,

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

Then save and exit the file. Make sure that you replace IPv6-IP-Address and IPv6-IP-Gateway-Address with the IPv6 details provided to you.

Step 4: Restart network service

The last step in enabling the IPv6 address on your server is to restart the network service in order for the changes to come into effect.

# /etc/init.d/network/restart
# it may be worked wit next line code 
# service network restart

 The Passage Was from e2enetworks.com

标签: linux centos ipv6

发表评论

路人甲 表情
看不清楚?点图切换 Ctrl+Enter快速提交

网友评论(0)

sitemap