Troubleshooting IPv6 Connectivity

Last Updated At: 2025-10-21 09:10:00

Overview

This document will provide you with basic troubleshooting ideas for IPv6 connectivity issues on CVM.

Directions

First, check whether the IPv6 configuration has been completed for CVM by following the four steps below:

  1. Run the following command to check whether the network interface (usually eth0) of the CVM has obtained a link-local IPv6 address starting with fe80.
  • If obtained, it indicates that the image has enabled the IPv6 feature. Please proceed to Step 2.

  • If not obtained, please refer to "Solution Step 1".

    Note:

    The IPv6 address that begins with fe80 is not an IPv6 address used for communication.

    ifconfig
    


2. Run the following command to check whether the network interface of the CVM (usually eth0) has obtained an IPv6 address starting with "2402" (not an address starting with "fe80").

  • If obtained, please proceed to Step 3.
  • If not obtained, please refer to "Solution Step 2".
ifconfig


3. Run the following command to check the default route of the network interface.

  • If the default route is configured and the public network is reachable via Ping, please proceed to Step 4.
  • If the default route is not visible or the public network cannot be reached via Ping, please refer to "Solution Step 3".
ip -6 route show

Use ping6 240c::6666 Or ping -6 240c::6666 to test public network connectivity.

4. Run the following command to confirm whether the IPv6 is being listened to on port 22 and port 80.
If port 22 and port 80 are not listening to IPv6, please refer to Solution Step 4.

netstat - tupln

Solutions

  1. If you cannot see an IPv6 address starting with fe80 using ifconfig, it indicates that the IPv6 feature is not enabled for the CVM. See Quick Start - Configuring IPv6 for CVM, select the image you need to enable IPv6 and reconfigure it. You can confirm by executing sysctl -a | grep ipv6 | grep disable.

  2. If you do not see an IPv6 address starting with "2402" via ifconfig, there are two possibilities:

    • The ENI of the CVM in the console is not allocated with an IPv6 address. You can solve this problem by logging in to the console to allocate an IPv6 address for the ENI. For details, see Applying for and Releasing IPv6 Address for Elastic Network Interface.
    • The dhcpv6 related configuration in the CVM is not configured properly or dhclient -6 is not executed. Log in to the CVM:
  3. Execute the following command to open the ifcfg-eth0 file in the folder /etc/sysconfig/network-scripts/.

    vim /etc/sysconfig/network-scripts/ifcfg-eth0
    
  4. Press i to switch to edit mode and add the following content.

    dhcpv6c=yes
    


5. Press Esc, enter :wq, save and return the file, and restart the CVM.
6. Execute the following commands in sequence to check whether an IPv6 address starting with 2402 has been obtained.

# If the CVM has multiple network interfaces, execute dhclient -6 network interface name, such as dhclient -6 eth0
dhclient -6 or dhclient -6 network interface name
ifconfig
  1. If an IPv6 address is obtained but the public network is not reachable via Ping, there are two possibilities:

    • The public network is not enabled for the IPv6 address. You can solve this problem by logging in to the console to enable the public network for the IPv6 address. For details, see Managing IPv6 Public Network.
    • No default route is configured. Use ip -6 route show to check whether the default route has been configured. If you don't see a default route, you need to:
  2. Execute the following command to open route6-eth0 file in the folder /etc/sysconfig/network-scripts/.

    vim /etc/sysconfig/network-scripts/route6-eth0
    
  3. Press i to switch to edit mode and add the following content.

    default dev eth0
    


10. Press Esc, enter :wq, save and return the file. Run the following command to restart the network service or restart the CVM.

service network restart
or
systemctl restart network
  1. If the IPv6 public network is reachable via Ping, but ports 22 or 80 cannot be accessed, it is usually due to configuration issues with sshd and Nginx files. The sshd and Nginx configurations need to be modified to make ports 22 or 80 listen to IPv6. After configuration is completed:
  2. Execute the following commands in sequence to restart the sshd and Nginx services.
service sshd restart
service nginx restart


13. By running netstat -tupln to check whether ports 22 or 80 are listening to IPv6, you can refer to the above "Operation Steps - Step 4".