All Products
Search
Document Center

Elastic Compute Service:Manage IPv6 addresses

Last Updated:May 29, 2024

If you want to implement IPv6 communication over the Internet or between private networks in a virtual private cloud (VPC), you can create an Elastic Compute Service (ECS) instance that is assigned IPv6 addresses in the VPC. Make sure the VPC and the vSwitch that you want to connect to the instance are assigned IPv6 CIDR blocks. This topic describes how to configure an ECS instance to communicate over IPv6, assign an IPv6 address to an ECS instance, and configure an IPv6 address for an ECS instance.

Note

Due to the depletion of IPv4 addresses, network engineers spend a large amount of time and effort resolving issues such as address conflicts in an IPv4 environment. Compared with IPv4 addresses, IPv6 addresses are more sufficient and allow more types of devices to access the Internet.

Regions that support IPv6 gateways

Area

Region

China

China (Qingdao), China (Beijing), China (Zhangjiakou), China (Hohhot), China (Ulanqab), China (Hangzhou), China (Shanghai), China (Fuzhou - Local Region), China (Shenzhen), China (Heyuan), China (Guangzhou), China (Chengdu), and China (Hong Kong)

Asia Pacific

Philippines (Manila), Singapore, Japan (Tokyo), South Korea (Seoul), Indonesia (Jakarta), Malaysia (Kuala Lumpur), and Thailand (Bangkok)

Europe and Americas

US (Virginia), US (Silicon Valley), and Germany (Frankfurt)

Middle East

SAU (Riyadh - Partner Region)

Important

The SAU (Riyadh - Partner Region) region is operated by a partner.

Configure IPv6 Internet access and private network access for an ECS instance

  1. Configure IPv6 Internet access and private network access for an ECS instance.

    Quick configuration

    You can use a template provided by Resource Orchestration Service (ROS) to quickly configure Internet access and private network access settings for an ECS instance. Perform the following operations by using the template as prompted:

    • Create a VPC and a vSwitch with IPv6 CIDR blocks

    • Assign an IPv6 address to an instance

    • Configure the IPv6 address for a network interface controller (NIC) of the instance

    • Add IPv6 security group rules

    • Enable IPv6 Internet bandwidth

      Configure the following settings for the Internet bandwidth:

      • Set the metering method to Pay-By-Data-Transfer.

      • Set the maximum bandwidth to 1 Mbit/s.

      Note

      By default, IPv6 Internet bandwidth is enabled if you use the quick configuration method. You are charged public bandwidth fees. If you do not need to use IPv6 Internet access, we recommend that you disable IPv6 Internet bandwidth to prevent unnecessary costs. For more information, see the Delete IPv6 Internet bandwidth section of the "Enable and manage IPv6 Internet bandwidth" topic.

    1. Open the deployment template. In the upper-left corner of the page, select a region.

    2. On the page that appears, follow the on-screen instructions to configure or select an ECS instance.

    3. Click Create.

      When the value of the Status parameter on the Stack Information tab of the stack changes to Created, the stack is deployed.

    Manual configuration

    1. Assign an IPv6 address to an ECS instance. For more information, see the Step 2: Assign an IPv6 address section of the "Configure an IPv6 address for an ECS instance" topic.

    2. Configure the IPv6 address. For more information, see the Configure an IPv6 address section of this topic.

      You can configure an IPv6 address for an NIC of an ECS instance. This way, the IPv6 address can be identified and takes effect in the operating system of the instance.

    3. Add IPv6 security group rules.

      IPv4 communication and IPv6 communication are independent of each other. If the current security group rules do not meet your business requirements, configure IPv6 security group rules for your instances to increase network security.

      Add IPv6 security group rules

      1. Log on to the ECS console.

      2. In the left-side navigation pane, choose Network & Security > Security Groups.

      3. In the top navigation bar, select the region and resource group to which the resource belongs. 地域

      4. Find the security group that you want to manage and click

        Manage Rules in the Operation column.

      5. On the details page of the security group, click the Inbound or Outbound tab in the Access Rule section.

      6. Add security group rules. For more information, see Add a security group rule.

        Note

        When you add an IPv6 security group rule, set Authorization Object to an IPv6 CIDR block. Example: 2001:db8:1234:1a00::***. For more information about security group rules, see Security group rules.

    4. (Optional) Enable IPv6 Internet bandwidth.

      By default, the IPv6 address of an instance can be used only for communications between private networks. To connect to the Internet by using the IPv6 address, enable IPv6 Internet bandwidth.

      Enable IPv6 Internet bandwidth

      1. Log on to the VPC console.

      2. In the left-side navigation pane, choose Access to Internet > IPv6 Gateway.

      3. In the top navigation bar, select the region where the IPv6 gateway is deployed.
      4. On the IPv6 Gateway page, find the IPv6 gateway that corresponds to the VPC in which the instance resides and click the IPv6 gateway ID.

      5. On the details page of the IPv6 gateway, click the IPv6 Internet Bandwidth tab, find the IPv6 address for which you want to enable Internet bandwidth, and then click Activate Internet Bandwidth in the Actions column.

      6. On the IPv6 Internet Bandwidth (PostPay) page, specify the parameters described in the following table, click Buy Now, and then complete the payment.

        Parameter

        Description

        Traffic

        Select a metering method for the Internet bandwidth.

        Valid values: Pay-By-Bandwidth and Pay-By-Data-Transfer. For more information, see Billing rules.

        Bandwidth

        Specify a maximum value for the Internet bandwidth.

        Billing cycle

        Select a billing cycle for the Internet bandwidth. Valid values: Day (By Day) and Hour (By Hour).

        If you set Traffic to Pay-By-Bandwidth, you can select only Day (By Day). If you set Traffic to Pay-By-Data-Transfer, you can select only Hour (By Hour).

  2. Test the connectivity of the IPv6 address.

    Test the connectivity of the IPv6 address to ensure that the instance to which the IPv6 address is assigned can communicate with the Internet.

    Test Internet connectivity

    ping -6 aliyun.com

    The following command output indicates that the instance can access the website.ping -6

    Test private network connectivity

    Run the ping6 <Private IPv6 address of ECS02> command on the ECS01 instance to ping the IPv6 address of the ECS02 instance and check whether ECS01 can access ECS02 over the private network.

    If ECS01 can receive ICMPv6 echo reply packets, the connection is established. The test result shows that ECS01 can access ECS02 by using the IPv6 address.pingecs02

    Run the ping6 command on the ECS02 instance to ping the IPv6 address of the ECS01 instance and check whether ECS02 can access ECS01 over the private network.

    If ECS02 can receive ICMPv6 echo reply packets, the connection is established. The test result shows that ECS02 can access ECS01 by using the IPv6 address.pingecs01

Assign an IPv6 address to an ECS instance

Assign an IPv6 address to an ECS instance to allow the instance to communicate with other instances or the Internet over IPv6.

Assign an IPv6 address to an existing instance

  1. Log on to the ECS console.

  2. In the left-side navigation pane, choose Instances & Images > Instances.

  3. In the top navigation bar, select the region and resource group to which the resource belongs. 地域

  4. Find the instance that you want to manage and choose icon1 > Network and Security Group > Manage IPv6 Addresses in the Actions column.

  5. In the Manage Secondary Private IP Address dialog box, assign an IPv6 address as prompted.

    Important

    If the IPv6 feature is disabled for the vSwitch to which the instance is connected, click Enable IPv6 for vSwitch to enable the IPv6 feature on the vSwitch page. For information about how to enable the IPv6 feature for a vSwitch, see Enable IPv6 for a vSwitch.

  6. Click Confirm.

Assign an IPv6 address when you create an instance

When you create an instance, take note of the following parameters. For information about other parameters, see Create an instance on the Custom Launch tab.

  • Network and Zone: Select a VPC and a vSwitch that are assigned IPv6 CIDR blocks. If IPv6 is disabled for a vSwitch, see Enable IPv6 for a vSwitch.

  • Instance: Search for instance types that support IPv6 and select an instance type from the search results.

    image

  • Bandwidths & Security Groups: Click ENI|IPv6(Optional) and select Assign IPv6 Address Free of Charge.

    image

After you assign the IPv6 address to the instance, you can view information about the IPv6 address in the ECS console. For more information, see View IP addresses.

Configure an IPv6 address

You can configure an IPv6 address for an NIC of an ECS instance. This way, the IPv6 address can be identified and takes effect in the operating system of the instance.

  1. Configure an IPv6 address.

    Important

    To automatically configure an IPv6 address, you must install Cloud Assistant. If your instance does not support Cloud Assistant or installation of Cloud Assistant is inconvenient, manually configure an IPv6 address.

    Automatically configure an IPv6 address (recommended)

    Prerequisites

    • Cloud Assistant Agent is installed on the instance. If Cloud Assistant Agent is not installed on the instance, see Install Cloud Assistant Agent.

    • The instance runs one of the following operating systems: Alibaba Cloud Linux 2, Alibaba Cloud Linux 3, CentOS 6, CentOS 7, CentOS 8, Red Hat 6, Red Hat 7, Anolis OS, Fedora, Ubuntu 14, Ubuntu 16, Ubuntu 18, Ubuntu 20, Debian 8, Debian 9, Debian 10, Debian 11, SUSE 11, SUSE 12, SUSE 15, openSUSE 15, openSUSE 42, and FreeBSD 11.

    Important

    During the configuration, Cloud Assistant is used, and NICs and the network service are restarted. This may cause a brief network interruption. Proceed with caution.

    Procedure

    1. Connect to the Linux instance.

      For more information, see Connect to a Linux instance by using a password or key.

    2. Run the following command to configure an IPv6 address:

      sudo acs-plugin-manager --exec --plugin=ecs-utils-ipv6

    Manually configure an IPv6 address for a Linux instance

    1. Connect to the Linux instance.

      For more information, see Connect to a Linux instance by using a password or key.

    2. Run the ip addr | grep inet6 or ifconfig | grep inet6 command to check whether IPv6 is enabled for the instance.

      • If the command output does not contain inet6 information, IPv6 is disabled for the instance. Perform the following operations to enable IPv6.

        Enable IPv6

        Alibaba Cloud Linux 2 and Alibaba Cloud Linux 3

        1. Run the following command to modify the /etc/sysctl.conf configuration file:

          vi /etc/sysctl.conf
        2. Press the I key to enter Insert mode, find the following content, and then replace 1 at the end of each line with 0:

          net.ipv6.conf.all.disable_ipv6 = 1
          net.ipv6.conf.default.disable_ipv6 = 1
          net.ipv6.conf.lo.disable_ipv6 = 1
        3. To enable IPv6 for a specific NIC, use the following settings:

          net.ipv6.conf.eth0.disable_ipv6 = 0
        4. Press the Esc key, enter :wq, press the Enter key to save the changes, and then exit Insert mode.

        5. Run the following command to check whether the configurations in the /etc/sysctl.conf file are consistent with those in the /etc/sysctl.conf file in the initram file system (initramfs):

          diff -u /etc/sysctl.conf <(lsinitrd -f /etc/sysctl.conf)
          Note

          An initramfs is configured for Alibaba Cloud Linux 2. If the configurations in the /etc/sysctl.conf file in the initramfs are inconsistent with those in the /etc/sysctl.conf file, the system may accept the configurations in the /etc/sysctl.conf file in the initramfs.

        6. If the configurations are inconsistent, run the following command to generate a new initramfs:

          sudo dracut -v -f
        7. Restart the instance for the configurations to take effect. For more information, see Restart an instance.

        8. Run the ip addr | grep inet6 or ifconfig | grep inet6 command to check whether IPv6 is enabled.

          If the command output contains inet6 information, IPv6 is enabled.

        CentOS 6 and CentOS 7

        1. Run the following command to modify the /etc/modprobe.d/disable_ipv6.conf configuration file:

          vi /etc/modprobe.d/disable_ipv6.conf
          1. Press the I key to enter Insert mode and replace options ipv6 disable=1 with options ipv6 disable=0.

          2. Press the Esc key, enter :wq, press the Enter key to save the changes, and then exit Insert mode.

        2. Run the following command to modify the /etc/sysconfig/network configuration file:

          vi /etc/sysconfig/network
          1. Press the I key to enter Insert mode and replace NETWORKING_IPV6=no with NETWORKING_IPV6=yes.

          2. Press the Esc key, enter :wq, press the Enter key to save the changes, and then exit Insert mode.

        3. (Optional) Run the following commands in sequence to reload the IPv6 module.

          Note

          If the instance runs a CentOS 6 operating system, perform this step. Otherwise, skip this step.

          modprobe ipv6 -r
          modprobe ipv6
          lsmod | grep ipv6

          If the IPv6 module is loaded, the following content is returned:

          ipv6                  xxxxx  8
          Note

          The parameter value on the third line of the returned content cannot be 0. Otherwise, you must re-enable IPv6.

        4. Run the following command to modify the /etc/sysctl.conf configuration file:

          vi /etc/sysctl.conf
          1. Press the I key to enter Insert mode, find the following content, and then replace 1 at the end of each line with 0:

            net.ipv6.conf.all.disable_ipv6 = 1
            net.ipv6.conf.default.disable_ipv6 = 1
            net.ipv6.conf.lo.disable_ipv6 = 1
          2. Press the Esc key, enter :wq, press the Enter key to save the changes, and then exit Insert mode.

        5. Run the following command for the configurations to take effect:

          sudo sysctl -p

        Debian 8 and Debian 9

        1. Run the following command to modify the /etc/default/grub configuration file:

          vi /etc/default/grub
          1. Press the I key to enter Insert mode and delete ipv6.disable=1 from the file.

          2. Press the Esc key, enter :wq, press the Enter key to save the changes, and then exit Insert mode.

        2. Run the following command to modify the /boot/grub/grub.cfg configuration file:

          vi /boot/grub/grub.cfg
          1. Press the I key to enter Insert mode and delete ipv6.disable=1 from the file.

          2. Press the Esc key, enter :wq, press the Enter key to save the changes, and then exit Insert mode.

        3. Restart the Linux instance. For more information, see Restart an instance.

        4. Run the following command to modify the /etc/sysctl.conf configuration file:

          vi /etc/sysctl.conf
          1. Press the I key to enter Insert mode, find the following content, and then replace 1 at the end of each line with 0:

            net.ipv6.conf.all.disable_ipv6 = 0
            net.ipv6.conf.default.disable_ipv6 = 0
            net.ipv6.conf.lo.disable_ipv6 = 0
          2. Press the Esc key, enter :wq, press the Enter key to save the changes, and then exit Insert mode.

        5. Run the following command for the configurations to take effect:

          sudo sysctl -p

        Ubuntu 14, Ubuntu 16, and openSUSE 42

        1. Run the following command to modify the vi /etc/sysctl.conf configuration file:

          vi /etc/sysctl.conf
          1. Press the I key to enter Insert mode, find the following content, and then replace 1 at the end of each line with 0:

            net.ipv6.conf.all.disable_ipv6 = 0
            net.ipv6.conf.default.disable_ipv6 = 0
            net.ipv6.conf.lo.disable_ipv6 = 0
          2. Press the Esc key, enter :wq, press the Enter key to save the changes, and then exit Insert mode.

        2. Run the following command for the configurations to take effect:

          sysctl -p

        FreeBSD 11

        1. Run the following command to modify the /etc/rc.conf configuration file:

          vi /etc/rc.conf
          1. Press the I key to enter Insert mode and add ipv6_activate_all_interfaces="YES" to the file.

          2. Press the Esc key, enter :wq, press the Enter key to save the changes, and then exit Insert mode.

        2. Run the following command to restart the network service for the configurations to take effect:

          /etc/netstart restart

        SUSE 11 and SUSE 12

        1. Run the following command to modify the /etc/modprobe.d/50-ipv6.conf configuration file:

          vi /etc/modprobe.d/50-ipv6.conf
          1. Press the I key to enter Insert mode and delete install ipv6 /bin/true from the file.

          2. Press the Esc key, enter :wq, press the Enter key to save the changes, and then exit Insert mode.

        2. Run the following command to modify the vi /etc/sysctl.conf configuration file:

          vi /etc/sysctl.conf
          1. Press the I key to enter Insert mode, find the following content, and then replace 1 at the end of each line with 0:

            net.ipv6.conf.all.disable_ipv6 = 0
            net.ipv6.conf.default.disable_ipv6 = 0
            net.ipv6.conf.lo.disable_ipv6 = 0
          2. Press the Esc key, enter :wq, press the Enter key to save the changes, and then exit Insert mode.

        3. Run the following command for the configurations to take effect:

          sysctl -p
      • If the command output contains inet6 information, IPv6 is enabled for the instance. You can configure an IPv6 address.

    3. Configure an IPv6 address.

      Alibaba Cloud Linux 2, Alibaba Cloud Linux 3, CentOS 6, CentOS 7, Red Hat 6, and Red Hat 7

      1. Run the following command to modify the NIC configuration file:

        vi /etc/sysconfig/network-scripts/ifcfg-eth0

        Replace eth0 with the actual NIC name. Save the changes and exit.

      2. Press the I key to enter Insert mode. Add the following configurations based on the actual information in the file:

        DHCPV6C=yes
        IPV6INIT=yes
      3. Press the Esc key, enter :wq, press the Enter key to save the changes, and then exit Insert mode.

      4. Restart the instance for the configurations to take effect. For more information, see Restart an instance.

      CentOS 8

      1. Check whether the NIC configuration file contains the IPV6INIT=yes and DHCPV6C=yes configurations. If yes, proceed to the next step. If not, add the configurations to the file.

        vi /etc/sysconfig/network-scripts/ifcfg-eth0

        In this example, eth0 is used. Replace eth0 with the actual NIC identifier. Save the changes and exit.

      2. Disable the feature that allows cloud-init to modify the NIC files in the /etc/sysconfig/network-scripts/ directory.

        Note

        You do not need to manually configure the assigned IPv6 addresses. However, the IPv6 addresses may be lost when the instance is restarted. You must disable the feature that allows cloud-init to modify NIC files.

        1. Run the vi /etc/cloud/cloud.cfg command to open the NIC configuration file.

          vi /etc/cloud/cloud.cfg
        2. Add the following content before Example datasource config:

          network:
            config: disabled

          Save the changes and exit.

      3. Restart the instance for the configurations to take effect. For more information, see Restart an instance.

      Debian 8, Debian 9, Debian 10, Debian 11, and Ubuntu 16

      1. Run the vi /etc/network/interfaces command to open the NIC configuration file and add the following content to the file based on the actual information:

        iface eth0 inet6 dhcp

        Replace eth0 with the actual NIC name. Save the changes and exit.

      2. Restart the instance for the configurations to take effect. For more information, see Restart an instance.

      Ubuntu 18 and Ubuntu 20

      1. Disable the feature that allows cloud-init to modify the NIC files in the /etc/sysconfig/network-scripts/ directory.

        Note

        Assigned IPv6 addresses do not need to be manually configured, but the IPv6 addresses may be lost when the instance is restarted. You must disable the feature that allows cloud-init to modify NIC files.

        1. Run the vi /etc/cloud/cloud.cfg command to open the NIC configuration file.

          vi /etc/cloud/cloud.cfg
        2. Add the following information before Example datasource config:

          network:
            config: disabled

          Save the changes and exit.

      2. Restart the instance for the configurations to take effect. For more information, see Restart an instance.

      Ubuntu 14

      1. Run the vi /etc/network/interfaces command to open the NIC configuration file and add the following content to the file based on the actual information:

        iface eth0 inet6 dhcp

        Replace eth0 with the actual NIC name. Save the changes and exit.

      2. Restart the instance for the configurations to take effect. For more information, see Restart an instance.

      FreeBSD 11

      1. Run the vi /etc/rc.conf command to open the NIC configuration file and add the following content to the file based on the actual information:

        ipv6_enable="YES"
        ipv6_ifconfig_vtnet0="<IPv6 address> <Subnet prefix length>"

        Replace vtnet0 with the actual NIC name. Save the changes and exit.

      2. Make the following changes to the file. Save the changes and exit.

        ip6addrctl_enable="YES"
        ipv6_activate_all_interfaces="YES"
        ipv6_network_interfaces="auto"

        After the changes are made, the configuration file contains the following content:

        hostname="Aliyun"
        sshd_enable="YES"
        dumpdev="NO"
        ipv6_enable="YES"
        ip6addrctl_enable="YES"
        ip6addrctl_policy="ipv4_prefer"
        ipv6_activate_all_interfaces="YES"
        ipv6_network_interfaces="auto"
        ifconfig_lo0="inet 127.0.0.1      netmask 255.0.0.0"
        ifconfig_vtnet0="inet 192.168.XX.XX netmask 255.255.255.0"
        ipv6_ifconfig_vtnet0="2001:XXXX:4:4:4:4:4:4 prefixlen 64"
        defaultrouter="192.168.XX.XX"
        hostname="freebsd"
      3. Restart the instance for the configurations to take effect. For more information, see Restart an instance.

      Anolis OS 7.9, Anolis OS 8.4, CentOS Stream, and Fedora

      1. Check whether the NIC configuration file contains the IPV6INIT=yes and DHCPV6C=yes configurations. If yes, no additional operations are required. If not, add the configurations to the file.

        vi /etc/sysconfig/network-scripts/ifcfg-eth0

        Replace eth0 with the actual NIC name. Save the changes and exit.

      2. Restart the instance for the configurations to take effect. For more information, see Restart an instance.

    Manually configure an IPv6 address for a Windows instance

    1. Connect to the Windows instance.

      For more information, see Connect to a Windows instance by using a password.

    2. Open Command Prompt and run the ipconfig command to check whether IPv6 is enabled for the instance.

      • If the command output does not contain inet6 information, IPv6 is disabled for the instance. Perform the following operations to enable IPv6.

        Enable IPv6

        1. Choose Control Panel > Network and Sharing Center > Network Connections.

        2. Click the name of the current network connection. In the shortcut menu that appears, click Properties.

        3. Select Internet Protocol Version 6 (TCP/IPv6).

          • To enable IPv6 on Windows Server 2008, 2012, 2016, 2019, or 2022, perform the following operations:

          • Check whether the IPv6 option is selected. If the IPv6 option is not selected, select the option and click OK.

          • To enable IPv6 on Windows Server 2003, perform the following operations:

          • Perform the following operations based on whether IPv6 is displayed:

            • If IPv6 is displayed, select Internet Protocol Version 6 (TCP/IPv6) and click OK.

            • If IPv6 is not displayed, perform the following operations:

              1. In the Local Area Connection Properties dialog box, click Install. In the Select Network Component Type dialog box, choose Protocol > Add.

              2. In the Select Network Protocol dialog box, select Microsoft TCP/IP Version 6 and click OK.

              3. Select Internet Protocol Version 6 (TCP/IPv6) and click OK.

      • If the command output contains inet6 information, IPv6 is enabled for the instance. You can configure an IPv6 address.

    3. Configure an IPv6 address.

      1. On the Instance Details page, obtain the generated IPv6 address.

      2. Configure the IPv6 address.

        • To configure an IPv6 address on Windows Server 2008, 2012, or 2016, perform the following operations:

          1. Choose Control Panel > Network and Internet > Network and Sharing Center.

          2. Click the name of the current network connection. In the shortcut menu that appears, click Properties.

          3. Choose Internet Protocol Version 6 (TCP/IPv6) > Properties.

          4. Select Use the Following IPv6 Address, enter the IPv6 address, subnet prefix length, and IPv6 gateway, and then click OK.

          5. (Optional) To associate multiple IPv6 addresses, perform the following operations: In the Internet Protocol Version 6 (TCP/IP) Properties dialog box, click Advanced. In the Advanced Settings dialog box, click Add to add multiple IPv6 addresses, and then click OK.

        • To configure an IPv6 address on Windows Server 2003, perform the following operations:

          1. Choose Control Panel > Network Connections to view the current network connection name. In this example, Local Area Connection 2 is displayed.

          2. On the Windows desktop, press Win+R to open the Run dialog box. Then, enter cmd and click OK to open Command Prompt.

          3. Add IPv6 addresses.

            • Run the following command to add a single IPv6 address:

            • netsh interface ipv6 add address "Local Area Connection 2" <IPv6 address>
            • Run the following commands to add multiple IPv6 addresses:

            • netsh interface ipv6 add address "Local Area Connection 2" <IPv6 address 1>
              netsh interface ipv6 add address "Local Area Connection 2" <IPv6 address 2>
          4. Run the following command to add the default route:

          5. netsh interface ipv6 add route ::/0 "Local Area Connection 2" <IPv6 gateway>
  2. (Conditionally required) If your ECS instance runs a Linux operating system, perform this step. Otherwise, skip this step.

    Run the following command to check whether the multi-NIC configuration tool is installed on the instance:

    ls /sbin/eni-ifscan

    If the following information is returned, the multi-NIC configuration tool is pre-installed on the instance. You need to modify the eni-function file of the multi-NIC configuration tool.

    Note

    By default, the multi-NIC configuration tool does not support IPv6. If the tool is pre-installed on a Linux instance, the NICs in the Linux system cannot automatically identify IPv6 addresses, and the system cannot obtain IPv6 addresses after the instance is restarted.

    image

    Modify the eni-function file.

    1. Run the following command to modify the eni-function file:

      vim /etc/eni_utils/eni-function 
    2. Press the I key to enter Insert mode, change IPV6INIT=no to IPV6INIT=yes, add DHCPV6C=yes, save the changes, and then exit.

      image

Delete an assigned IPv6 address

You can delete IPv6 addresses that you no longer need. After you delete the IPv6 address of an ECS instance, the instance can still use its IPv4 address. To delete an IPv6 address in the ECS console, perform the following steps.

Important

Make sure that the instance is in the Running or Stopped state.

Procedure

  1. Log on to the ECS console.

  2. In the left-side navigation pane, choose Network & Security > Elastic Network Interfaces.

  3. In the top navigation bar, select the region and resource group to which the resource belongs. 地域

  4. On the Elastic Network Interfaces page, find the ENI that is bound to the instance and assigned an IPv6 address and click Manage ENI IP Addresses in the Operation column.

  5. In the Manage ENI IP Addresses dialog box, click the image.png icon next to the IPv6 address that you want to delete.

  6. Click Confirm.

References

  • You can delete the Internet bandwidth for an IPv6 address that does not need to communicate with the Internet. For more information, see the Delete IPv6 Internet bandwidth section of the "Enable and manage IPv6 Internet bandwidth" topic.

  • You can add and manage IPv6 routes in a routing table to manage IPv6 traffic in a VPC. For more information, see Create and manage IPv6 routes.