Add IPv6 as a secondary IP configuration on the existing NIC, leaving its current IPv4 configuration unchanged and primary; a load balancer is not required for this configuration.^1^
1. Enable IPv6 on the VNet and subnet first
In the Azure portal:
- Go to Virtual networks and select the VM’s VNet.
- Select Address space.
- Select Add additional address range, enter the IPv6 range, and save it.
- Microsoft’s example uses a
/63 VNet range.
- Select Subnets, then select the subnet containing the VM.
- Enable Add IPv6 address space.
- Enter a
/64 IPv6 subnet contained within the VNet’s IPv6 range, and save.
Azure requires dual-stack networking: IPv6-only VMs are not supported, and each NIC must retain at least one IPv4 configuration.^2^
2. Create a public IPv6 address if Internet connectivity is required
For a private IPv6 address only, proceed to the NIC configuration. For direct public IPv6 connectivity:
- Go to Public IP addresses → Create.
- Set:
- IP version: IPv6
- SKU: Standard
- Location: The VM’s region
- Create the address.
This public IP is associated directly with the VM’s secondary NIC configuration, so it does not require a load balancer.^1^
3. Add the secondary IPv6 configuration
- Go to Virtual machines → your VM.
- Select Networking.
- Select the NIC name.
- Select IP configurations → + Add.
- Configure:
- Name: For example,
Ipv6config
- IP version: IPv6
- Allocation: Dynamic
- Public IP address: Associate the Standard IPv6 public IP if required
- Select OK.
Do not edit or convert the existing IPv4 configuration. Additional IP configurations are secondary and do not require changing the primary IP allocation.^3^
CLI alternative
If the portal continues presenting the new configuration as primary, create it explicitly with Azure CLI after adding IPv6 to the VNet and subnet:
az network nic ip-config create \
--resource-group <resource-group> \
--name Ipv6config \
--nic-name <nic-name> \
--private-ip-address-version IPv6 \
--vnet-name <vnet-name> \
--subnet <subnet-name> \
--public-ip-address <ipv6-public-ip-name>
Omit --public-ip-address when only private IPv6 is required. The resulting NIC should contain the original primary IPv4 configuration plus the new secondary IPv6 configuration.^1^
If the VNet cannot accept an IPv6 range
Azure cannot add an IPv6 range to an existing VNet that has resource navigation links. If adding the VNet or subnet prefix fails, check whether that limitation applies; remediation may require using another VNet rather than changing the NIC.^2^
References
- Add a dual-stack network to an existing virtual machine
- What is IPv6 for Azure Virtual Network?
- Assign multiple IP addresses to virtual machines using the Azure portal