This topic describes how to configure an IPv6 address for a Windows instance. IPv6
addresses can be manually configured, or automatically configured by the system. We
recommend that you use an appropriate tool to automatically configure IPv6 addresses.
Automatically configure an IPv6 address
The ecs-util-ipv6 tool can be used to configure IPv6 addresses for instances that
are assigned IPv6 addresses, or clear IPv6 configurations for instances that are not
assigned IPv6 addresses.
The ecs-util-ipv6 tool has the following limits:
- The ecs-util-ipv6 tool applies only to Elastic Compute Service (ECS) instances in
virtual private clouds (VPCs) and relies on instance metadata. Before you use this
tool, make sure that the network service or the relevant outbound IP port (100.100.100.200:80)
is enabled. For more information, see Overview of ECS instance metadata.
- When the ecs-util-ipv6 tool is running, network interface controllers (NICs) and the
network service are restarted. As a result, your network connection may be unavailable
for a period of time. Proceed with caution.
You can download the ecs-util-ipv6 tool from the following links:
Download the tool to your operating system and run the following command to run the
tool as an administrator:
ecs-utils-ipv6.exe
If your ECS instance is assigned an IPv6 address, the tool automatically configures
the IPv6 address. Otherwise, the tool clears the existing IPv6 address configurations.
If you want to configure IPv6 addresses for multiple instances at a time, we recommend
that you use Cloud Assistant or user data to configure scripts that automate the process
of configuring IPv6 addresses. For more information, see
Overview and
Overview of ECS instance user data. In the following script, Windows 64-bit and PowerShell are used:
#powershell
$install_dir="C:\Windows\system32"
$install_path = "$install_dir\ecs-utils-ipv6.exe"
if(-not (Test-Path -Path $install_path)){
# download the tool
$tool_url = 'http://ecs-image-utils.oss-cn-hangzhou.aliyuncs.com/ipv6/win/64/ecs-utils-ipv6.exe'
Invoke-WebRequest -uri $tool_url -OutFile $install_path
Unblock-File $install_path
}
# run the tool
Start-Process -FilePath "$install_path" -ArgumentList "--noenterkey" -NoNewWindow
Manually configure an IPv6 address
Perform the following steps to manually configure an IPv6 address:
- Check whether IPv6 is enabled for your instance.
- Connect to the instance. For more information, see Connect to a Windows instance by using password authentication.
- Start Windows CMD.
- Run the ipconfig command.
- If the IPv6 address information is returned, IPv6 is enabled for your instance.
- If no IPv6 address information is returned, IPv6 is not enabled for your instance.
Perform the following steps to enable IPv6.
- Enable IPv6.
- Perform the following steps to enable IPv6 on Windows Server 2008, 2012, and 2016
operating systems:
- Connect to the instance.
- Choose .
- In the View your active networks section of the Network and Sharing Center dialog
box, click the current network connection name. In the Wi-Fi Status dialog box, click
Wireless Properties.
- Check whether the IPv6 option is selected. If the IPv6 option is not selected, select
it and click OK.
- Perform the following steps to enable IPv6 on Windows Server 2003:
- Connect to the instance. For more information, see Connect to a Windows instance by using password authentication.
- Choose .
- In the View your active networks section of the Network and Sharing Center dialog
box, click the current network connection name. In the Wi-Fi Status dialog box, click
Wireless Properties.
- Perform the following operations as needed:
- If IPv6 is displayed, select Internet Protocol Version 6 (TCP/IPv6), and then click OK.
- If IPv6 is not displayed, install IPv6, select Internet Protocol Version 6 (TCP/IPv6), and then click OK. Perform the following steps to install IPv6:
- In the Local Area Connection Properties dialog box, click Install. In the Select Network Component Type dialog box, choose .
- In the Select Network Protocol dialog box, choose .
- Check the IPv6 address assigned to the instance.
You can view the IPv6 address assigned to the instance by using the ECS console or
instance metadata.
- ECS Console: For more information, see Step 2: Assign an IPv6 address.
- Instance metadata: You can view the IPv6 address by using the following metadata.
For more information, see Overview of ECS instance metadata.
- IPv6 address: network/interfaces/macs/[mac]/ipv6s
- IPv6 gateway: network/interfaces/macs/[mac]/ipv6-gateway
- IPv6 vSwitch CIDR block: network/interfaces/macs/[mac]/vswitch-ipv6-cidr-block
- Manually configure IPv6 addresses.
- Perform the following steps to enable IPv6 on Windows Server 2008, 2012, and 2016
operating systems:
- Connect to the instance. For more information, see Connect to a Windows instance by using password authentication.
- Choose > Network and Sharing Center.
- In the View your active networks section of the Network and Sharing Center dialog
box, click the current network connection name. In the Wi-Fi Status dialog box, click
Wireless Properties.
- Choose .
- Select Use the Following IPv6 Address, enter the IPv6 address, subnet prefix length, and IPv6 gateway, and then click OK.
- (Optional) Assign multiple IPv6 addresses: 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.
- Perform the following steps to enable IPv6 on Windows Server 2003:
- Connect to the instance. For more information, see Connect to a Windows instance by using password authentication.
- Choose to view the current network connection name. In this example, Local Area Connection 2 is displayed.
- Start Windows CMD.
- 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 command 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>
- Run the following command to add a default route:
netsh interface ipv6 add route ::/0 "Local Area Connection 2" <IPv6 gateway>