networking azure ipv6 azure-networking – How to Add a Public IPv6 Address to a Linux VM in Azure

azureazure-networkingipv6networking

I have a Centos7 VM instance running in Azure. It has a public IPv4 address reachable from the internet. I would like to add a public IPv6 address to this instance's network interface but I cannot figure out how to do this. There does not seem to be a way to add it to the interface from the portal. I have consulted the documentation but it seems to have conflicting information that suggests it is not possible, or that it can only be achieved by creating a new VM. I have attempted this also but again could not get it to work. Information I have found on Google appears to be outdated.

I would appreciate it very much if someone could advise on whether it is possible to have both public IPv4 and IPv6 addresses allocated to the same VM, and if so how this might be acheived. Thanks!

Best Answer

I believe that you are not able to change your current NIC to allow IPv6, so you must either redeploy your VM or attach a new NIC IPv6 and delete the old one. Also all SKUs for public IP (IPv4 and IPv6) must be the same (Dynamic or Standard). Don't forget to keep save your VM's disks to avoid any mistake. All steps to achieve this configuration are below.

I suggest you to test it in staging before changing your production.

1 - configure an address space IPv6 for your VNet address space

2 - configure your current subnet where this VM lives to allow IPv6 subnet

3 - Your NIC looks like as this picture. Configure both IPv4 and IPv6 for this NiC. nic

4 - Your VM shows up both IP (IPv4 and IPv6) vm information