:_mod-docs-content-type: ASSEMBLY
ifdef::context[:parent-context: {context}]

[id="planning-your-ipam-configuration_{context}"]

:context: ipam-configuration

= Planning your IPAM configuration

[role="_abstract"]
In a {rhos_long} deployment, each service that is deployed on the {rhocp_long}
worker nodes requires an IP address from the IP Address Management (IPAM) pool.
In a {rhos_prev_long} ({OpenStackShort}) deployment, all services that are
hosted on a Controller node share the same IP address.

The {rhos_acro} control plane has different requirements for the number of IP
addresses that are made available for services. Depending on the size of the IP
ranges that are used in the existing {rhos_acro} deployment, you might reuse
these ranges for the {rhos_acro} control plane.

The total number of IP addresses that are required for the new control plane services in each isolated network is calculated as the sum of the following:

* The number of {OpenShiftShort} worker nodes. Each worker node requires 1 IP address in the `NodeNetworkConfigurationPolicy` custom resource (CR).
* The number of IP addresses required for the data plane nodes. Each node requires an IP address from the `NetConfig` CRs.
* The number of IP addresses required for control plane services. Each service requires an IP address from the `NetworkAttachmentDefinition` CRs. This number depends on the number of replicas for each service.
* The number of IP addresses required for load balancer IP addresses. Each service requires a Virtual IP address from the `IPAddressPool` CRs.

For example, a simple single worker node {OpenShiftShort} deployment
with Red Hat OpenShift Local has the following IP ranges defined for the `internalapi` network:

* 1 IP address for the single worker node
* 1 IP address for the data plane node
* `NetworkAttachmentDefinition` CRs for control plane services:
  `X.X.X.30-X.X.X.70` (41 addresses)
* `IPAllocationPool` CRs for load balancer IPs: `X.X.X.80-X.X.X.90` (11
  addresses)

This example shows a total of 54 IP addresses allocated to the `internalapi`
allocation pools.

// TODO: update the numbers above for a more realistic multinode cluster.

The requirements might differ depending on the list of {OpenStackShort} services
to be deployed, their replica numbers, and the number of {OpenShiftShort} worker nodes and data plane nodes.

Additional IP addresses might be required in future {OpenStackShort} releases, so you must plan for some extra capacity for each of the allocation pools that are used in the new environment.

After you determine the required IP pool size for the new deployment, you can choose to define new IP address ranges or reuse your existing IP address ranges. Regardless of the scenario, the VLAN tags in the existing deployment are reused in the new deployment. Ensure that the VLAN tags are properly retained in the new configuration.

ifeval::["{build_variant}" != "ospdo"]
include::../modules/proc_using-new-subnet-ranges.adoc[leveloffset=+1]
endif::[]

include::../modules/proc_reusing-existing-subnet-ranges.adoc[leveloffset=+1]

[role="_additional-resources"]
== Additional resources
*  xref:configuring-isolated-networks_configuring-network[Configuring isolated networks]

ifdef::parent-context[:context: {parent-context}]
ifndef::parent-context[:!context:]
