Configure DHCPv6 for Linux VMs
Some of the Linux virtual-machine images in the Azure Marketplace don't have Dynamic Host Configuration Protocol version 6 (DHCPv6) configured by default. To support IPv6, DHCPv6 must be configured in the Linux OS distribution that you're using. The various Linux distributions configure DHCPv6 in various ways because they use different packages.
Recent SUSE Linux and CoreOS images in the Azure Marketplace have been pre-configured with DHCPv6. No additional changes are required when you use these images.
This document describes how to enable DHCPv6 so that your Linux virtual machine obtains an IPv6 address.
By improperly editing network configuration files, you can lose network access to your VM. We recommended that you test your configuration changes on non-production systems. The instructions in this article have been tested on the latest versions of the Linux images in the Azure Marketplace. For more detailed instructions, consult the documentation for your own version of Linux.
For RHEL, CentOS, and Oracle Linux versions 7.4 or higher, follow these steps:
Edit the /etc/sysconfig/network file, and add the following parameter:
Edit the /etc/sysconfig/network-scripts/ifcfg-eth0 file, and add the following two parameters:
Renew the IPv6 address:
sudo ifdown eth0 && sudo ifup eth0