Adding a Public IPv6 Address to a Linux Server (CentOS 6)

Adding a Public IPv6 Address to a Linux Server (CentOS 6)

To configure an additional public IPv6 address in CentOS 6, proceed as follows:

Prerequisites:

You wrote down the main IPv4 address.

You have assigned a main IPv6 address and an additional IPv6 address to the server.

You have logged in to the server as an administrator.

  1. To add the main IPv6 address, you must insert the following entries in /etc/sysconfig/network-scripts/ifcfg-eth0:
    Networking_IPV6="yes"
    DHCPV6C="no"
    IPV6INIT="yes"
    IPV6_AUTOCONF="no"
    IPV6ADDR=MAIN IPv6 ADDRESS/64
    IPV6_DEFAULTGW=fe80::1%eth0

    Example:

    [root@localhost ~]# vi /etc/sysconfig/network-scripts/ifcfg-eth0
    DEVICE="eth0"
    BOOTPROTO="dhcp"
    NETWORKING_IPV6="yes"
    DHCPV6C="no"
    IPV6INIT="yes"
    IPV6_AUTOCONF="no"
    IPV6ADDR=2001:ba0:2020:53c8:ac66:35c6:7a84:bd18/64
    IPV6_DEFAULTGW=fe80::1%eth0
    MTU="1500"
    NM_CONTROLLED="no"
    ONBOOT="yes"
    TYPE="Ethernet"
  2. To add the additional IPv6 address, you must specify in /etc/sysconfig/network-scripts/ifcfg-eth0 the entry IPV6ADDR_SECONDARIES= and the additional IPv6 address. Example:
    [root@localhost ~]# vi /etc/sysconfig/network-scripts/ifcfg-eth0
    DEVICE="eth0"
    BOOTPROTO="dhcp"
    NETWORKING_IPV6="yes"
    DHCPV6C="no"
    IPV6INIT="yes"
    IPV6_AUTOCONF="no"
    IPV6ADDR=2001:ba0:2020:53c8:ac66:35c6:7a84:bd18/64
    IPV6_DEFAULTGW=fe80::1%eth0
    IPV6ADDR_SECONDARIES=2001:ba0:2020:53c8:cb04:94a5:24d:23ff
    MTU="1500"
    NM_CONTROLLED="no"
    ONBOOT="yes"
    TYPE="Ethernet"
    Note: To configure multiple additional IPv6 addresses, enter them in the IPV6ADDR_SECONDARIES= entry and separate them with a space.
  3. To restart the network, enter the following command:
    [root@localhost /]# /etc/init.d/network restart
  4. To check whether the additional IPv6 address has been assigned to the server, type the following command:
    [root@localhost /]# ifconfig eth0
  • 1 Users Found This Useful
Was this answer helpful?

Related Articles

Install LAMP Server (Apache, MySQL, PHP) On RHEL, CentOS, Scientific Linux 6.5/6.4

LAMP is a combination of operating system and open-source software stack. The acronym LAMP is...

Install EPEL Repository On RHEL / CentOS / Scientific linux 6.x, 5.x

EPEL stands for Extra Packages for Enterprise Linux. It is a Fedora Special Interest Group that...

Install REMI Repository On RHEL, CentOS, Scientific Linux 7/6.x/5.x And Fedora

This tutorial describes how to add REMI repository which is created and maintained by a French...

How to Create a VirtualHost in Apache 2.2 on CentOS 6.7

  1. Confirm Apache 2.2 is correctly installed and running Type in the following...