• Help & contact
    • Spring Offers
      %

    For Dedicated Servers

    This article explains how to add an additional, public IPv6 address on a Dedicated Server where CentOS 7 is installed.

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

    Requirements
    • In the  Cloud Panel, you have assigned an additional public IPv6 address to your server.

    • You have logged on to the server as an administrator.

    • Check the entries in the ifcfg-eth0 file. Enter the following command:

      [root@localhost ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth0

    • To add an additional IP address, you need an Ethernet alias. To do this, a consecutive number is simply appended to the interface name, starting with 1 for the first alias. Thus, the first alias of eth0 is eth0:1. To create the following file: /etc/sysconfig/network-scripts/ifcfg-eth0:1 with the vi Editor, please enter the following command:

      [root@localhost ~]# vi /etc/sysconfig/network-scripts/ifcfg-eth0:1

    Notes
    • The vi Editor has a command mode and an insert mode. To switch to input mode, press [i] on your keyboard. You can now insert the required content or make the required changes. Press the [ESC] key on your keyboard to exit the input mode.

    • To exit vi and save the file, type the command :wq, then press Enter.

    • To add an additional public IPv6 address to the network interface configuration, enter the following information:

      DEVICE=eth0:1
      Type=Ethernet
      ONBOOT=yes
      NM_CONTROLLED=no
      BOOTPROTO=none
      IPV6ADDR=ADDITIONAL IPv6 Address
      PREFIX=64

      Example:

      DEVICE=eth0:1
      Type=Ethernet
      ONBOOT=yes
      NM_CONTROLLED=no
      BOOTPROTO=none
      IPV6ADDR=2001:8d8:1801:8298::2
      PREFIX=64

    • Save the file.

    • Restart your server. To do this, enter the following command:

      [root@localhost ~]# reboot

      The SSH connection will be interrupted after the command is entered.

    • Log on to the server again.

    • To check if the additional public IPv6 address has been added, type the following command:

      [root@localhost ~]# ip addr

      The additional public IPv6 address will now be displayed. Example:

      [root@4eb7808 ~]# ip addr
      1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
          link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
          inet 127.0.0.1/8 scope host lo
             valid_lft forever preferred_lft forever
          inet6 ::1/128 scope host
             valid_lft forever preferred_lft forever
      2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
          link/ether 3c:ec:ef:22:65:fa brd ff:ff:ff:ff:ff:ff
          inet 87.106.126.210/32 brd 87.106.126.210 scope global dynamic eth0
             valid_lft 43085sec preferred_lft 43085sec
          inet6 2001:8d8:1801:8298::1/128 scope global dynamic
             valid_lft 3485sec preferred_lft 3485sec
          inet6 2001:8d8:1801:8298::2/64 scope global
             valid_lft forever preferred_lft forever
          inet6 fe80::3eec:efff:fe22:65fa/64 scope link
             valid_lft forever preferred_lft forever
      3: eth1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN group default qlen 1000
          link/ether 3c:ec:ef:22:65:fb brd ff:ff:ff:ff:ff:ff