All Documents
Current Document

Content is empty

If you don't find the content you expect, please try another search term


IPv6 auto-configuration tool

Last updated:2021-08-04 11:26:31

If you encounter the following problems, it is recommended that you use the kec-ipv6-setup-utils tool detailed in this topic to automatically configure IPv6 addresses:

  • Some standard images of your new KEC instances cannot automatically discover IPv6 addresses.
  • Custom images cannot automatically discover IPv6 addresses due to configuration problems.
  • IPv6 addresses cannot be discovered in the situation where IPv6 is enabled after KEC instances are created. The configuration tool only supports Linux operating systems, not Windows operating systems.


The configuration tool is applicable to standard Linux images provided by Kingsoft Cloud and custom images created based on the standard images.

The configuration tool uses a DHCP client to automatically configure IPv6 addresses for instances already assigned with IPv6 addresses, or to automatically clear existing IPv6 configurations for instances not assigned with IPv6 addresses.


  • When the configuration tool is running, it automatically restarts ENIs and disables ip6tables and network services. As a result, the network will become unavailable for a short time. It is recommended that you plan your business beforehand.
  • To use the configuration tool, you must have root user permissions.


Click to download the configuration tool.


How to execute it

  1. Save the configuration tool to a running instance.
  2. Execute the following command as the root user to view instructions on how to use the script.

    chmod +x ./kec-ipv6-setup-utils
    ./kec-ipv6-setup-utils --enable

Command line parameters

Usage: kec-ipv6-setup-utils  command ...[parameters]....
    --help, -h, -V           Show this help message.
    --version, -v, -V        Show version info.
    --enable                 Enable ipv6.
    --disable                Disable ipv6.

Commands used to enable and disable IPv6 are as follows:

./kec-ipv6-setup-utils --enable    #Enable IPv6.
./kec-ipv6-setup-utils --disable   #Disable IPv6.

Common prompts


need to reboot

It indicates that the instance needs to be restarted. This prompt has the highest priority. You must ignore all other prompts and restart the instance first.


Upgrade a DHCP client

Even if the script restarts the network and does not get the ipv6 address, we will execute 'dhclient -6 &' again, 
try to get the available address. If you still find that the network card does not have a normal ipv6 address, 
please try to update the dhcp client software.

It indicates that you are recommended to upgrade your DHCP client.

The configuration tool uses a DHCP client to automatically configure IPv6 addresses for instances already assigned with IPv6 addresses. When the kec-ipv6-setup-utils --enable command is executed, the ENIs will be restarted to rediscover IPv6 addresses. If the correct IPv6 addresses are not found, the system will execute dhclient -6 & to try to obtain the IPv6 addresses once again. If the prompt appears together with the need to reboot prompt, restart the instance first. Otherwise, you need to manually upgrade your DHCP client.

Select the method for manually upgrading the DHCP client based on your operating system. These methods include:

  • For CentOS, Fedora, and RedHat operating systems

    yum install dhclient
  • For Ubuntu operating systems
    sudo apt-get install isc-dhcp-client
    sudo apt-get install isc-dhcp-common
  • For Debian operating systems, the latest version of DHCP client on Debian 9 is recommended
    sudo apt-get install isc-dhcp-client
    sudo apt-get installisc-dhcp-client >= 4.3.5
On this page
Pure ModeNormal Mode

Pure Mode

Click to preview the document content in full screen