Skip to content

Commit c1d2e05

Browse files
committed
OCPBUGS-44843 Update guidance on why why you would one way over the other to manage additional networks
1 parent c10dd59 commit c1d2e05

File tree

1 file changed

+45
-15
lines changed

1 file changed

+45
-15
lines changed

networking/multiple_networks/configuring-additional-network.adoc

Lines changed: 45 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -16,31 +16,61 @@ As a cluster administrator, you can configure an additional network for your clu
1616
* xref:../../networking/multiple_networks/configuring-additional-network.adoc#nw-multus-tap-object_configuring-additional-network[TAP]
1717
* xref:../../networking/multiple_networks/configuring-additional-network.adoc#configuration-ovnk-additional-networks_configuring-additional-network[OVN-Kubernetes]
1818
19-
[id="{context}_approaches-managing-additional-network"]
19+
[id="approaches-managing-additional-network_{context}"]
2020
== Approaches to managing an additional network
2121

22-
You can manage the lifecycle of an additional network by choosing one of the two available approaches. Each approach is mutually exclusive and you can only use one approach for managing an additional network at a time. For either approach, the additional network is managed by a Container Network Interface (CNI) plugin that you configure.
22+
You can manage the lifecycle of an additional network in {product-title} by using one of two approaches: modifying the Cluster Network Operator (CNO) configuration or applying a YAML manifest. Each approach is mutually exclusive and you can only use one approach for managing an additional network at a time. For either approach, the additional network is managed by a Container Network Interface (CNI) plugin that you configure. The two different approaches are summarized here:
2323

24-
* Modify the Cluster Network Operator (CNO) configuration: The CNO automatically creates and manages the `NetworkAttachmentDefinition` custom resource definition (CRD). In addition to managing an object lifecycle the CNO ensures a DHCP is available for an additional network that uses a DHCP-assigned IP address.
24+
* Modifying the Cluster Network Operator (CNO) configuration: Configuring additional networks through CNO is only possible for cluster administrators. The CNO automatically creates and manages the `NetworkAttachmentDefinition` object. By using this approach, you can define `NetworkAttachmentDefinition` objects at install time through configuration of the `install-config`.
2525

26-
* Applying a YAML manifest: You can manage the additional network directly by creating a `NetworkAttachmentDefinition` CRD. This approach allows for the chaining of CNI plugins.
27-
28-
For an additional network, IP addresses are provisioned through an IP Address Management (IPAM) CNI plugin that you configure as part of the additional network. The IPAM plugin supports a variety of IP address assignment approaches including Dynamic Host Configuration Protocol (DHCP) and static assignment.
26+
* Applying a YAML manifest: You can manage the additional network directly by creating an `NetworkAttachmentDefinition` object. Compared to modifying the CNO configuration, this approach gives you more granular control and flexibility when it comes to configuration.
2927

3028
[NOTE]
3129
====
32-
When deploying {product-title} nodes with multiple network interfaces on {rh-openstack-first} with OVN Kubernetes, DNS configuration of the additional interface might take precedence over the DNS configuration of the primary interface. In this case, remove the DNS nameservers for the subnet ID that is attached to the additional interface:
30+
When deploying {product-title} nodes with multiple network interfaces on {rh-openstack-first} with OVN Kubernetes, DNS configuration of the secondary interface might take precedence over the DNS configuration of the primary interface. In this case, remove the DNS nameservers for the subnet ID that is attached to the secondary interface:
3331
3432
[source,terminal]
3533
----
3634
$ openstack subnet set --dns-nameserver 0.0.0.0 <subnet_id>
3735
----
3836
====
3937

40-
[id="{context}_configuration-additional-network-attachment"]
38+
[id="ip-address-assignment-for-additional-networks_{context}"]
39+
== IP address assignment for additional networks
40+
41+
For additional networks, IP addresses can be assigned using an IP Address Management (IPAM) CNI plugin, which supports various assignment methods, including Dynamic Host Configuration Protocol (DHCP) and static assignment.
42+
43+
The DHCP IPAM CNI plugin responsible for dynamic assignment of IP addresses operates with two distinct components:
44+
45+
* *CNI Plugin*: Responsible for integrating with the Kubernetes networking stack to request and release IP addresses.
46+
* *DHCP IPAM CNI Daemon*: A listener for DHCP events that coordinates with existing DHCP servers in the environment to handle IP address assignment requests. This daemon is _not_ a DHCP server itself.
47+
48+
For networks requiring `type: dhcp` in their IPAM configuration, ensure the following:
49+
50+
* A DHCP server is available and running in the environment. The DHCP server is external to the cluster and is expected to be part of the customer's existing network infrastructure.
51+
* The DHCP server is appropriately configured to serve IP addresses to the nodes.
52+
53+
In cases where a DHCP server is unavailable in the environment, it is recommended to use the Whereabouts IPAM CNI plugin instead. The Whereabouts CNI provides similar IP address management capabilities without the need for an external DHCP server.
54+
55+
[NOTE]
56+
====
57+
Use the Whereabouts CNI plugin when there is no external DHCP server or where static IP address management is preferred. The Whereabouts plugin includes a reconciler daemon to manage stale IP address allocations.
58+
====
59+
60+
A DHCP lease must be periodically renewed throughout the container's lifetime, so a separate daemon, the DHCP IPAM CNI Daemon, is required. To deploy the DHCP IPAM CNI daemon, modify the Cluster Network Operator (CNO) configuration to trigger the deployment of this daemon as part of the additional network setup.
61+
62+
[role="_additional-resources"]
63+
.Additional resources
64+
65+
* xref:../../networking/multiple_networks/configuring-additional-network.adoc#nw-multus-dhcp_configuring-additional-network[Dynamic IP address (DHCP) assignment configuration]
66+
67+
* xref:../../networking/multiple_networks/configuring-additional-network.adoc#nw-multus-whereabouts_configuring-additional-network[Dynamic IP address assignment configuration with Whereabouts]
68+
69+
[id="configuration-additional-network-attachment_{context}"]
4170
== Configuration for an additional network attachment
4271

4372
An additional network is configured by using the `NetworkAttachmentDefinition` API in the `k8s.cni.cncf.io` API group.
73+
4474
[IMPORTANT]
4575
====
4676
Do not store any sensitive information or a secret in the `NetworkAttachmentDefinition` CRD because this information is accessible by the project administration user.
@@ -67,7 +97,7 @@ The configuration for the API is described in the following table:
6797

6898
|====
6999

70-
[id="{context}_configuration-additional-network-cno"]
100+
[id="configuration-additional-network-cno_{context}"]
71101
=== Configuration of an additional network through the Cluster Network Operator
72102

73103
The configuration for an additional network attachment is specified as part of the Cluster Network Operator (CNO) configuration.
@@ -102,7 +132,7 @@ To prevent namespace issues for the OVN-Kubernetes network plugin, do not name y
102132
====
103133
<4> A CNI plugin configuration in JSON format.
104134

105-
[id="{context}_configuration-additional-network-yaml"]
135+
[id="configuration-additional-network-yaml_{context}"]
106136
=== Configuration of an additional network from a YAML manifest
107137

108138
The configuration for an additional network is specified from a YAML configuration file, such as in the following example:
@@ -122,7 +152,7 @@ spec:
122152
<1> The name for the additional network attachment that you are creating.
123153
<2> A CNI plugin configuration in JSON format.
124154

125-
[id="{context}_configuration-additional-network-types"]
155+
[id="configuration-additional-network-types_{context}"]
126156
== Configurations for additional network types
127157

128158
The specific configuration fields for additional networks is described in the following sections.
@@ -163,19 +193,19 @@ include::modules/configuration-ovnk-multi-network-policy.adoc[leveloffset=+3]
163193
//include::modules/configuring-layer-three-routed-topology.adoc[leveloffset=+3]
164194
include::modules/configuring-layer-two-switched-topology.adoc[leveloffset=+3]
165195

166-
[id="{context}_ovn-kubernetes-configuration-for-a-localnet-topology"]
196+
[id="ovn-kubernetes-configuration-for-a-localnet-topology_{context}"]
167197
==== Configuration for a localnet topology
168198

169199
// Configuration for a localnet switched topology
170200
include::modules/configuring-localnet-switched-topology.adoc[tag=localnet-intro]
171201

172202
// Workaround lack of xref in modules
173-
[id="{context}_configuration-additional-network-types-prerequisites"]
203+
[id="configuration-additional-network-types-prerequisites_{context}"]
174204
===== Prerequisites for configuring OVN-Kubernetes additional network
175205

176206
- The NMState Operator is installed. For more information, see xref:../../networking/networking_operators/k8s-nmstate-about-the-k8s-nmstate-operator.adoc#k8s-nmstate-about-the-k8s-nmstate-operator[Kubernetes NMState Operator].
177207

178-
[id="{context}_configuration-additional-network-interface"]
208+
[id="configuration-additional-network-interface_{context}"]
179209
===== Configuration for an OVN-Kubernetes additional network mapping
180210

181211
// Configuration for a localnet switched topology
@@ -202,7 +232,7 @@ include::modules/nw-multus-configure-dualstack-ip-address.adoc[leveloffset=+2]
202232

203233
[role="_additional-resources"]
204234
.Additional resources
205-
* xref:../../networking/multiple_networks/attaching-pod.html#nw-multus-add-pod_attaching-pod[Attaching a pod to an additional network]
235+
* xref:../../networking/multiple_networks/attaching-pod.adoc#nw-multus-add-pod_attaching-pod[Attaching a pod to an additional network]
206236

207237
// Creating an additional network attachment with the Cluster Network Operator
208238
include::modules/nw-multus-create-network.adoc[leveloffset=+1]

0 commit comments

Comments
 (0)