Prepare a VM guest OS for IPv6

    How to

    OpenStack (not Calico) controls whether a VM gets IPv4, IPv6, or both addresses. Calico simply honors the addresses that OpenStack specifies. The following extra steps are required for IPv6 only and dual stack deployments — so the guest OS can learn its IPv6 address (if assigned by OpenStack).

    1. Verify that the guest VM image meets these requirements for IPv6 connectivity.

      • When booting up, the VM must issue a DHCPv6 request for each of its interfaces, so that it can learn the IPv6 addresses that OpenStack allocates for it. If the VM uses the widely-deployed DHCP client from ISC, it must have a fix/workaround for this known issue.

      Although not all common cloud images meet these requirements yet, it is easy to remedy by launching an image, making appropriate changes to its configuration files, taking a snapshot, and then using the snapshot thereafter instead of the original image.

      • In , add:

      • In , add at the start of the script:

      • In , create a file named with contents:

      runcmd:

      • sed -i -e ‘$a’”IPV6INIT=yes” /etc/sysconfig/network-scripts/ifcfg-eth0
      • sed -i ‘/PATH/i\new_ip6_prefixlen=128’ /sbin/dhclient-script
      • systemctl restart network
    2. Configure IPv6 support in Calico by defining an IPv6 subnet in each Neutron network with:

      • The IPv6 address range that you want your VMs to use
      • IPv6 address mode set to DHCPv6 stateful

      We suggest that you initially configure both IPv4 and IPv6 subnets in each network. This allows handling VM images that support only IPv4 alongside those that support both IPv4 and IPv6, and allows a VM to be accessed over IPv4 in case this is needed to troubleshoot any issues with its IPv6 configuration. In principle, though, we are not aware of any problems with configuring and using IPv6-only networks in OpenStack.