- Documentation
Elastic Compute Service
Elastic Compute Service
User Guide
Network
Network interface and IP address
IP Address
IPv6 address
Configuring private IPv6 addresses for ECS instances
IPv6 address
Configuring private IPv6 addresses for ECS instances
Configuring private IPv6 addresses for ECS instances
After you assign an IPv6 address to the primary or secondary network interface of an ECS instance, the ECS image may not be able to identify the IPv6 address. You need to log in to the ECS instance and configure the IPv6 address manually.
- You have assigned IPv6 addresses to primary or secondary network interfaces associated with the ECS instance. Otherwise, assign an IPv6 address first. For more information, refer to Assigning IPv6 addresses.
- If ECS images cannot recognize the secondary private IPv6 address, log in to the ECS instance and execute the command for viewing IP addresses for the private IPv6 address of the secondary network interface.
tip
Commands for viewing IP addresses:
- Linux: Execute the ip address show command in the command line.
- Windows: Execute the ipconfig command in the command line.
CentOS
Ubuntu
Debian/veLinux
Windows
Steps for CentOS 7.9:
- Execute the following command to open the configuration file for the network interface.
tip
eth1 is the newly configured network interface.
- Press the i to enter edit mode. Confirm whether the file contains the following content. If not, input the following content:
- Press Esc to exit the edit mode, input :wq and press Enter.
- Execute reboot command to restart the ECS instance.
- Execute ip address show command to view the configuration updates.
- As shown in the following figure, the IPv6 address of the secondary network interface is identified.
-
- Execute the following command to open the configuration file for the network interface.
- Press the i to enter edit mode. Confirm whether the file contains the following content. If not, input the following content:
tip
eth1 is the newly configured network interface.
- Press Esc to exit the edit mode, input :wq and press Enter.
- Execute reboot command to restart the ECS instance.
- Execute ip address show command to view the configuration updates.
- As shown in the following figure, the IPv6 address of the secondary network interface is identified.
-
- Execute the following command to open the configuration file for the network interface.
- Press the i to enter edit mode. Confirm whether the file contains the following content. If not, input the following content:
- Press Esc to exit the edit mode, input :wq and press Enter.
- Execute netplan apply command to reconfigure the network and make the configuration effective.
- Execute systemctl restart systemd-networkd.service command to restart the network service.
- Execute ip address show command to view the configuration updates.
-
- Execute the following command to open the configuration file for the network interface.
- Press the i to enter edit mode. Confirm whether the file contains the following content. If not, input the following content:
tip
eth1 is the newly configured network interface.
- Press Esc to exit the edit mode, input :wq and press Enter.
- Execute reboot command to restart the ECS instance.
- Execute ip address show command to view the configuration updates.
- As shown in the following figure, the IPv6 address of the secondary network interface is identified.
-
Steps for Windows Server 2019:
- Click "Start > Control Panel" to enter the Control Panel page.
- Click "Network and Internet" and the "Network and Sharing Center" to open Network and Sharing Center.
- In the left-side navigation pane, select "Change adapter settings" to open the network connections window.
- Double-click the network connection as needed, such as Ethernet 2. Then, the status window pops up.
- Click "Properties" button, and then double-click the "Internet Protocol Version 6(TCP/IPv6)" button to open the property configuration window.
- Select "Use the following IPv6 address", and then click the "Advanced" button to open the advanced TCP/IP settings window.
- Click "Add" button to open the TCP/IP address window, input the IPv6 address and subnet prefix length64 (that is, the subnet mask length), and then click "Add" button to complete the operation.
- (Optional) Repeat step 8 to add multiple IPv6 addresses.
10. Click the "OK" button in each window to save the configuration.
11. Click "Start > Windows PowerShell" and execute the ipconfig command to view the updated IP configuration.
- As shown in the following figure, two IPv6 addresses have been configured.
Last updated: 2026.06.18 17:49:50