Skip to content

OpenStack IPv6 Example

This guide provides an example of how to set up an environment that provides Virtual Machines with IPv4 and IPv6 connectivity.

Minimal Example

To simplify this example, we only describe the mandatory steps and options. The OpenStack network component configuration is described in Networking

IPv6 support

You have the possibility to allocate IPv6 Global Unicast Addresses for your virtual subnets. IPv6 is supported in the Dual-Stack mode, which means that a single virtual network may have both IPv4 and IPv6 subnets. Ports of virtual machines connected to such network, will get both IPv4 and IPv6 addresses. IPv6-only networks are currently not fully supported, due to limitations in the Metadata service. While you may still run such setups, your virtual machines will not be able to retrieve public SSH keys or use other features that the Metadata service provides.

There is no possibility to use Floating IPs in the IPv6 address family, which means that you cannot allocate a Floating IP from the IPv6 address pool, neither you can have a Floating IP pointing at an IPv6 address.

globally-routable

Please note that any virtual machine or load balancer with an IPv6 address in a globally routable subnet is immediately reachable from the Internet, please plan your security groups accordingly.

Prerequisites

  • An OpenStack project

Router

We need a router to connect external (for example internet) and internal networks.

Create Router To create a router:

  1. On the routers list, click Create
  2. Assign a name and a description.
  3. Choose the external network that the router will connect to. for example "ext-net"
  4. Confirm the creation by clicking Create Router

Network and Subnets

We need to create a virtual network which contains our IPv4 and IPv6 subnets.

Create Network To create a network:

  1. On the networks list, click Create
  2. Name and describe your network.
  3. Configure Subnet:

    • Assign a name to the subnet.
    • IP version: Choose IPv4.
    • Network Address: Set the address range for the subnet.
  4. Confirm by clicking Create Network

View Network with subnet

  1. The UI will now show this network and subnet.

  2. Click on Create SUBNET to add the IPv6 subnet.

Create Subnet with IPv6

  1. Configure Subnet:

    • Assign a name to the subnet.
    • IP version: Choose IPv6.
    • Network Address: Choose Allocate Network Address from Pool
    • Subnet Pool: Choose subnet-pool-v6_1
    • IPv6 Address Configuration Mode: Choose DHCPv6 stateless
  2. Confirm by clicking Create Subnet

View Network with subnets

  1. The UI will now show this network and both subnets (IPv4 and IPv6).

Router Interfaces

We need to connect our router to our network.

Add Router Interface

To add router interfaces:

  1. Open Routers and select your router.

  2. Click on ADD INTERFACE to add interfaces.

  3. Configure the Interface:

    • Subnet: Assign one Subnet from the network we created in the previous section.
  4. Confirm by clicking CREATE AND ATTACH INTERFACE

  5. Repeat Steps 2-4 to add your second subnet.

List Router Interface.

  1. The UI will now show two interfaces of the router which are connected to your network.

Security Group

As VMs do not allow incoming connections by default, we need to configure a security group to allow incoming network connections.

Allowing incoming connections is optional

This step is only required if incoming external network connections are needed, e.g., SSH or HTTPS access to the VM.

Perform this configuration with caution, as this will expose services of the virtual machine to the configured remote networks.

To add security groups (Optional):

  1. Open Security Groups and click on CREATE

  2. Set a Name and Description for this security group.

  3. Confirm by clicking CREATE SECURITY GROUP

  4. Click on ADD RULE to add additional rules.

  5. Define a rule to manage network traffic to and from your instances by:

Add security group

  • Traffic Direction: Choose whether the rules apply to incoming (ingress) or outgoing (egress) traffic.
  • Protocol: Define the network protocol that the rule will target.
  • Description: Add an optional description.
  • Source: Specify to which port or port range this rule applies.
    • Any Port: Use to apply the rule to any port.
    • Specific: Target a specific port by its protocol name or code.
    • Range: Define a range of protocol codes, where the end code is higher than the start code.
  • Remote: Specify the remote IP address or remote security group for the rule.
    • CIDR: CIDR specifies the remote network address or network prefix.
    • Ethertype: For IPv6 network prefixes, select v6.
  1. Confirm by clicking Create Rule .

Virtual Machine

You can now create and connect Virtual Machines to this network.

Create server

When creating a new Server, the network can be attached in the connectivity configuration section.

The IPv6 address offered to the Virtual Machine will be displayed in the server list.

Further information can be found in Server

Operating System

Please consider that the Virtual Machine Operating System must be configured to support IPv6 and perform the network configuration.

The example provided above performs automatic network configuration which is sufficient for the Ubuntu Images available by default.

For further details on the Operating System configuration, check the vendor documentation.

globally-routable

Please note that VMs connected to this network may receive a globally routable IPv6 network address by default.