// Module included in the following assemblies:
//
// * installing/installing_openstack/installing-openstack-installer-custom.adoc
:_mod-docs-content-type: PROCEDURE
[id="install-osp-deploy-dualstack_{context}"]
= Deploying the dual-stack cluster

.Procedure

. Create a network with IPv4 and IPv6 subnets. The available address modes for the `ipv6-ra-mode` and `ipv6-address-mode` fields are: `dhcpv6-stateful`, `dhcpv6-stateless`, and `slaac`.
+
[NOTE]
====
The dualstack network MTU must accommodate both the minimum MTU for IPv6, which is 1280, and the OVN-Kubernetes encapsulation overhead, which is 100.
====
+
[NOTE]
====
DHCP must be enabled on the subnets.
====

. Create the API and Ingress VIPs ports.

. Add the IPv6 subnet to the router to enable router advertisements. If you are using a provider network, you can enable router advertisements by adding the network as an external gateway, which also enables external connectivity.


. To configure IPv4 and IPv6 address endpoints for cluster nodes, edit the `install-config.yaml` file. The following is an example of an `install-config.yaml` file:
+
.Example `install-config.yaml`

[source, yaml]
----
apiVersion: v1
baseDomain: mydomain.test
compute:
- name: worker
  platform:
    openstack:
      type: m1.xlarge
  replicas: 3
controlPlane:
  name: master
  platform:
    openstack:
      type: m1.xlarge
  replicas: 3
metadata:
  name: mycluster
networking:
  machineNetwork: <1>
  - cidr: "192.168.25.0/24"
  - cidr: "fd2e:6f44:5dd8:c956::/64"
  clusterNetwork: <1>
  - cidr: 10.128.0.0/14
    hostPrefix: 23
  - cidr: fd01::/48
    hostPrefix: 64
  serviceNetwork: <1>
  - 172.30.0.0/16
  - fd02::/112
platform:
  openstack:
    ingressVIPs: ['192.168.25.79', 'fd2e:6f44:5dd8:c956:f816:3eff:fef1:1bad'] <2>
    apiVIPs: ['192.168.25.199', 'fd2e:6f44:5dd8:c956:f816:3eff:fe78:cf36'] <3>
    controlPlanePort: <4>
      fixedIPs: <5>
      - subnet: <6>
          name: subnet-v4
          id: subnet-v4-id
      - subnet: <6>
          name: subnet-v6
          id: subnet-v6-id
      network: <7>
        name: dualstack
        id: network-id
----
<1> You must specify an IP address range for both the IPv4 and IPv6 address families.
<2> Specify the virtual IP (VIP) address endpoints for the Ingress VIP services to provide an interface to the cluster.
<3> Specify the virtual IP (VIP) address endpoints for the API VIP services to provide an interface to the cluster.
<4> Specify the dual-stack network details that are used by all of the nodes across the cluster.
<5> The CIDR of any subnet specified in this field must match the CIDRs listed on `networks.machineNetwork`.
<6> You can specify a value for either `name` or `id`, or both.
<7> Specifying the `network` under the `ControlPlanePort` field is optional.
+
Alternatively, if you want an IPv6 primary dual-stack cluster, edit the `install-config.yaml` file following the example below:
+
.Example `install-config.yaml`

[source, yaml]
----
apiVersion: v1
baseDomain: mydomain.test
compute:
- name: worker
  platform:
    openstack:
      type: m1.xlarge
  replicas: 3
controlPlane:
  name: master
  platform:
    openstack:
      type: m1.xlarge
  replicas: 3
metadata:
  name: mycluster
networking:
  machineNetwork: <1>
  - cidr: "fd2e:6f44:5dd8:c956::/64"
  - cidr: "192.168.25.0/24"
  clusterNetwork: <1>
  - cidr: fd01::/48
    hostPrefix: 64
  - cidr: 10.128.0.0/14
    hostPrefix: 23
  serviceNetwork: <1>
  - fd02::/112
  - 172.30.0.0/16
platform:
  openstack:
    ingressVIPs: ['fd2e:6f44:5dd8:c956:f816:3eff:fef1:1bad', '192.168.25.79'] <2>
    apiVIPs: ['fd2e:6f44:5dd8:c956:f816:3eff:fe78:cf36', '192.168.25.199'] <3>
    controlPlanePort: <4>
      fixedIPs: <5>
      - subnet: <6>
          name: subnet-v6
          id: subnet-v6-id
      - subnet: <6>
          name: subnet-v4
          id: subnet-v4-id
      network: <7>
        name: dualstack
        id: network-id
----
<1> You must specify an IP address range for both the IPv4 and IPv6 address families.
<2> Specify the virtual IP (VIP) address endpoints for the Ingress VIP services to provide an interface to the cluster.
<3> Specify the virtual IP (VIP) address endpoints for the API VIP services to provide an interface to the cluster.
<4> Specify the dual-stack network details that are used by all the nodes across the cluster.
<5> The CIDR of any subnet specified in this field must match the CIDRs listed on `networks.machineNetwork`.
<6> You can specify a value for either `name` or `id`, or both.
<7> Specifying the `network` under the `ControlPlanePort` field is optional.