How to set up IPv6 on an Azure Ubuntu 24.04 VM

J. Laiho 0 Reputation points

I'm running a Ubuntu 24.04 VM. I've set up IPv6 in the Azure VM settings as instructed by the documentation, and it appears to be set up correctly: just as I had private and public IPv4 addresses by default, I now also have private and public IPv6 addresses displayed in all the right places, attached to the VM NIC as far as I can tell.

Booting the VM after this assignment did not make them appear in the ip addr output, however. The private IPv4 address is there, but the private IPv6 is not.

The image is apparently using systemd-networkd for network configuration. I presume that it's not set up to handle IPv6 by default, since the VMs are not given IPv6 addresses by default.

Let's presume for the moment that everything is correctly configured on the Azure web UI side, and it's just the running VM that needs extra configuration.

What do I need to add to /run/systemd/network/ (or possibly elsewhere)? Currently, the relevant file there, contains this default content:

Azure Virtual Machines
Azure Virtual Machines
An Azure service that is used to provision Windows and Linux virtual machines.
7,518 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. deherman-MSFT 35,241 Reputation points Microsoft Employee

    @J. Laiho

    I launched a new Ubuntu 24.04 and attached an existing NIC with IPv4 and Ipv6 addresses. By default it was able to utilize IPv6.
    User's image

    This is what my network file looks like. Try updating yours to see if it resolves the issue.

    root@vm24041:/home/azureuser# cat /run/systemd/network/

    If you still have questions, please let us know in the "comments" and we would be happy to help you. Comment is the fastest way of notifying the experts.

    If the answer has been helpful, we appreciate hearing from you and would love to help others who may have the same question. Accepting answers helps increase visibility of this question for other members of the Microsoft Q&A community.

    Thank you for helping to improve Microsoft Q&A!

    User's image