I am unable to add an IPv6 configuration to a VM network interface

Jim Willsher Admin 0 Reputation points
2026-10-23T14:29:16.2266667+00:00

Hello

I have a VM that's configured with IPv4. All works well.

I want to add an IPv6 interface. Within "Network Interfaces" I choose to add an IP configuration. As soon as I toggle IPv4 to IPv6 the type then becomes "Primary", and I when I try to save I am told that IPv6 cannot be primary.

How can I add an IPv6 interface please? I do NOT have a load balancer.

Many thanks

Jim

Azure Virtual Network
Azure Virtual Network

An Azure networking service that is used to provision private networks and optionally to connect to on-premises datacenters.

0 comments No comments

2 answers

Sort by: Most helpful
  1. Dio Xavier 298.2K Reputation points Volunteer Moderator
    2026-10-23T14:34:52.1966667+00:00

    Hello

    Welcome to the Microsoft Azure Community.

    Good day, @Jim Willsher Admin .You can keep your current IPv4 address and add a secondary IPv6 configuration. In Azure, the primary configuration for a network interface must be IPv4; therefore, the portal does not allow you to set IPv6 as the primary configuration.

    Follow these steps:

    1. In the Azure portal, go to Virtual machines -> your VM -> Networking -> Network interface.

    2. Open IP configurations -> + Add.

    3. Set IP version to IPv6 and Type to Secondary.

    4. Configure the IPv6 address and save.

    Please note: the virtual network subnet must have an IPv6 address space configured. Additionally, there are limitations regarding the addition of a private IPv6 address to network interfaces already attached to existing VMs, depending on the specific scenario. The official documentation provides details on these requirements.

    See: Configure IP addresses for an Azure network interface.

    Important: You do not need a load balancer simply to understand or configure the network interface; however, the availability of IPv6 depends on your Azure network topology and requirements.

    Was this answer helpful?


  2. AI answer

    2026-10-23T14:30:03.5133333+00:00

    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:

    1. Go to Virtual networks and select the VM’s VNet.
    2. Select Address space.
    3. Select Add additional address range, enter the IPv6 range, and save it.
      • Microsoft’s example uses a /63 VNet range.
    4. Select Subnets, then select the subnet containing the VM.
    5. Enable Add IPv6 address space.
    6. 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:

    1. Go to Public IP addresses → Create.
    2. Set:
      • IP version: IPv6
      • SKU: Standard
      • Location: The VM’s region
    3. 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

    1. Go to Virtual machines → your VM.
    2. Select Networking.
    3. Select the NIC name.
    4. Select IP configurations → + Add.
    5. Configure:
      • Name: For example, Ipv6config
      • IP version: IPv6
      • Allocation: Dynamic
      • Public IP address: Associate the Standard IPv6 public IP if required
    6. 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

    1. Add a dual-stack network to an existing virtual machine
    2. What is IPv6 for Azure Virtual Network?
    3. Assign multiple IP addresses to virtual machines using the Azure portal
    AI-generated content may be incorrect. Read our transparency notes for more information.

    Was this answer helpful?

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.