You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: modules/cnf-creating-an-additional-sriov-network-with-vrf-plug-in.adoc
+8-11Lines changed: 8 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,7 +13,7 @@ The SR-IOV Network Operator manages additional network definitions. When you spe
13
13
Do not edit `NetworkAttachmentDefinition` custom resources that the SR-IOV Network Operator manages. Doing so might disrupt network traffic on your additional network.
14
14
====
15
15
16
-
To create an additional SR-IOV network attachment with the CNI VRF plugin, perform the following procedure.
16
+
To create an additional SR-IOV network attachment with the CNI virtual routing and forwarding (VRF) plugin, perform the following procedure.
17
17
18
18
.Prerequisites
19
19
@@ -52,8 +52,8 @@ spec:
52
52
"vrfname": "example-vrf-name" <2>
53
53
}
54
54
----
55
-
<1> `type`must be set to `vrf`.
56
-
<2> `vrfname` is the name of the VRF that the interface is assigned to. If it does not exist in the pod, it is created.
55
+
<1> Set the `type`parameter to `vrf`.
56
+
<2> Specify a name for the VRF in the `vrfname` parameter. An interface gets assigned to the VRF. If you do not specify a name for the VRF in a pod, the SR-IOV Network Operator automatically generates a name for the VRF.
57
57
58
58
. Create the `SriovNetwork` resource:
59
59
+
@@ -82,8 +82,10 @@ There might be a delay before the SR-IOV Network Operator creates the CR.
82
82
To verify that the VRF CNI is correctly configured and that the additional SR-IOV network attachment is attached, do the following:
83
83
84
84
. Create an SR-IOV network that uses the VRF CNI.
85
+
85
86
. Assign the network to a pod.
86
-
. Verify that the pod network attachment is connected to the SR-IOV additional network. Remote shell into the pod and run the following command. The expected output shows the name of the VRF interface and its unique ID in the routing table.
87
+
88
+
. Verify that the pod network attachment connects to the SR-IOV additional network. Ensure that you remote shell login into the pod and run the following command. The expected output shows the name of the VRF interface and its unique ID in the routing table.
87
89
+
88
90
[source,terminal]
89
91
----
@@ -97,10 +99,5 @@ $ ip vrf show
97
99
$ ip link
98
100
----
99
101
+
100
-
.Example output
101
-
[source,terminal]
102
-
----
103
-
...
104
-
5: net1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master red state UP mode
105
-
...
106
-
----
102
+
Example output: `5: net1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master red state UP mode`
Copy file name to clipboardExpand all lines: modules/nw-multus-add-pod.adoc
+4-7Lines changed: 4 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -58,7 +58,7 @@ endif::sriov[]
58
58
.Procedure
59
59
60
60
. Add an annotation to the `Pod` object. Only one of the following annotation formats can be used:
61
-
61
+
+
62
62
.. To attach a secondary network without any customization, add an annotation with the following format. Replace `<network>` with the name of the secondary network to associate with the pod:
<1> To specify more than one secondary network, separate each network
71
-
with a comma. Do not include whitespace between the comma. If you specify
72
-
the same secondary network multiple times, that pod will have multiple network
73
-
interfaces attached to that network.
74
-
70
+
<1> To specify more than one secondary network, separate each network with a comma. Do not include whitespace between the comma. If you specify the same secondary network multiple times, that pod will have multiple network interfaces attached to that network.
71
+
+
75
72
.. To attach a secondary network with customizations, add an annotation with the following format:
<1> The `name` key is the name of the secondary network to associate
70
-
with the pod.
71
-
<2> The `default-route` key specifies a value of a gateway for traffic to be routed over if no other
72
-
routing entry is present in the routing table. If more than one `default-route` key is specified,
73
-
this will cause the pod to fail to become active.
74
+
+
75
+
--
76
+
where:
74
77
78
+
`name`:: The `name` key is the name of the secondary network to associate
79
+
with the pod.
80
+
`default-route`:: The `default-route` key specifies a value of a gateway for traffic to be routed over if no other routing entry is present in the routing table. If more than one `default-route` key is specified, this will cause the pod to fail to become active.
81
+
--
82
+
+
75
83
The default route will cause any traffic that is not specified in other routes to be routed to the gateway.
76
-
84
+
+
77
85
[IMPORTANT]
78
86
====
79
87
Setting the default route to an interface other than the default network interface for {product-title}
80
88
may cause traffic that is anticipated for pod-to-pod traffic to be routed over another interface.
81
89
====
82
-
90
+
+
83
91
To verify the routing properties of a pod, the `oc` command may be used to execute the `ip` command within a pod.
84
-
92
+
+
85
93
[source,terminal]
86
94
----
87
95
$ oc exec -it <pod_name> -- ip route
88
96
----
89
-
97
+
+
90
98
[NOTE]
91
99
====
92
100
You may also reference the pod's `k8s.v1.cni.cncf.io/network-status` to see which secondary network has been
93
101
assigned the default route, by the presence of the `default-route` key in the JSON-formatted list of objects.
94
102
====
95
-
103
+
+
96
104
To set a static IP address or MAC address for a pod you can use the JSON formatted annotations. This requires you create networks that specifically allow for this functionality. This can be specified in a rawCNIConfig for the CNO.
97
105
98
106
. Edit the CNO CR by running the following command:
@@ -101,9 +109,9 @@ To set a static IP address or MAC address for a pod you can use the JSON formatt
101
109
----
102
110
$ oc edit networks.operator.openshift.io cluster
103
111
----
104
-
112
+
+
105
113
The following YAML describes the configuration parameters for the CNO:
106
-
114
+
+
107
115
.Cluster Network Operator YAML configuration
108
116
[source,terminal,subs="attributes+"]
109
117
----
@@ -114,15 +122,17 @@ rawCNIConfig: '{ <3>
114
122
}'
115
123
type: Raw
116
124
----
117
-
<1> Specify a name for the secondary network attachment that you are
118
-
creating. The name must be unique within the specified `namespace`.
119
-
<2> Specify the namespace to create the network attachment in. If
120
-
you do not specify a value, then the `default` namespace is used.
121
-
<3> Specify the CNI plugin configuration in JSON format, which
122
-
is based on the following template.
125
+
+
126
+
--
127
+
where:
123
128
129
+
`name`:: Specify a name for the secondary network attachment that you are creating. The name must be unique within the specified `namespace`.
130
+
`namespace`:: Specify the namespace to create the network attachment in. If you do not specify a value, then the `default` namespace is used.
131
+
`rawCNIConfig`:: Specify the CNI plugin configuration in JSON format, which is based on the following template.
132
+
--
133
+
+
124
134
The following object describes the configuration parameters for utilizing static MAC address and IP address using the macvlan CNI plugin:
125
-
135
+
+
126
136
.macvlan CNI plugin JSON configuration object using static IP and MAC address
127
137
[source,json]
128
138
----
@@ -143,28 +153,28 @@ The following object describes the configuration parameters for utilizing static
143
153
}]
144
154
}
145
155
----
146
-
147
-
<1> Specifies the name for the secondary network attachment to create. The name must be unique within the specified `namespace`.
148
-
149
-
<2> Specifies an array of CNI plugin configurations. The first object specifies a macvlan plugin configuration and the second object specifies a tuning plugin configuration.
150
-
151
-
<3> Specifies that a request is made to enable the static IP address functionality of the CNI plugin runtime configuration capabilities.
152
-
153
-
<4> Specifies the interface that the macvlan plugin uses.
154
-
155
-
<5> Specifies that a request is made to enable the static MAC address functionality of a CNI plugin.
156
-
156
+
+
157
+
--
158
+
where:
159
+
160
+
`name`:: Specifies the name for the secondary network attachment to create. The name must be unique within the specified `namespace`.
161
+
`plugins`:: Specifies an array of CNI plugin configurations. The first object specifies a macvlan plugin configuration and the second object specifies a tuning plugin configuration.
162
+
`ips`:: Specifies that a request is made to enable the static IP address functionality of the CNI plugin runtime configuration capabilities.
163
+
`master`:: Specifies the interface that the macvlan plugin uses.
164
+
`mac`:: Specifies that a request is made to enable the static MAC address functionality of a CNI plugin.
165
+
--
166
+
+
157
167
The above network attachment can be referenced in a JSON formatted annotation, along with keys to specify which static IP and MAC address will be assigned to a given pod.
158
-
168
+
+
159
169
Edit the pod with:
160
-
170
+
+
161
171
[source,terminal]
162
172
----
163
173
$ oc edit pod <name>
164
174
----
165
-
175
+
+
166
176
.macvlan CNI plugin JSON configuration object using static IP and MAC address
167
-
177
+
+
168
178
[source,yaml]
169
179
----
170
180
apiVersion: v1
@@ -180,20 +190,17 @@ metadata:
180
190
}
181
191
]'
182
192
----
183
-
184
193
<1> Use the `<name>` as provided when creating the `rawCNIConfig` above.
185
-
186
194
<2> Provide an IP address including the subnet mask.
187
-
188
195
<3> Provide the MAC address.
189
-
196
+
+
190
197
[NOTE]
191
198
====
192
199
Static IP addresses and MAC addresses do not have to be used at the same time, you may use them individually, or together.
193
200
====
194
-
195
-
To verify the IP address and MAC properties of a pod with secondary networks, use the `oc` command to execute the ip command within a pod.
196
-
201
+
+
202
+
. To verify the IP address and MAC properties of a pod with secondary networks, use the `oc` command to execute the ip command within a pod.
Copy file name to clipboardExpand all lines: modules/nw-multus-ipam-object.adoc
+11-33Lines changed: 11 additions & 33 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,7 +13,7 @@
13
13
[id="nw-multus-ipam-object_{context}"]
14
14
= Configuration of IP address assignment for a network attachment
15
15
16
-
For secondary 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.
16
+
For secondary networks, you can assign IP addresses by using an IP Address Management (IPAM) CNI plugin, which supports various assignment methods, including Dynamic Host Configuration Protocol (DHCP) and static assignment.
17
17
18
18
The DHCP IPAM CNI plugin responsible for dynamic assignment of IP addresses operates with two distinct components:
19
19
@@ -22,17 +22,18 @@ The DHCP IPAM CNI plugin responsible for dynamic assignment of IP addresses oper
22
22
23
23
For networks requiring `type: dhcp` in their IPAM configuration, ensure the following:
24
24
25
-
* 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.
25
+
* A DHCP server is available and running in the environment.
26
+
* The DHCP server is external to the cluster and you expect the server to form part of the existing network infrastructure for the customer.
26
27
* The DHCP server is appropriately configured to serve IP addresses to the nodes.
27
28
28
-
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.
29
+
In cases where a DHCP server is unavailable in the environment, consider using the Whereabouts IPAM CNI plugin instead. The Whereabouts CNI provides similar IP address management capabilities without the need for an external DHCP server.
29
30
30
31
[NOTE]
31
32
====
32
-
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.
33
+
Use the Whereabouts CNI plugin when no external DHCP server exists or where static IP address management is preferred. The Whereabouts plugin includes a reconciler daemon to manage stale IP address allocations.
33
34
====
34
35
35
-
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 secondary network setup.
36
+
Ensure the periodic renewal of a DHCP lease throughout the lifetime of a container by including a separate daemon, the DHCP IPAM CNI Daemon. To deploy the DHCP IPAM CNI daemon, change the Cluster Network Operator (CNO) configuration to trigger the deployment of this daemon as part of the secondary network setup.
36
37
37
38
////
38
39
IMPORTANT: If you set the `type` parameter to the `DHCP` value, you cannot set any other parameters.
@@ -75,7 +76,7 @@ The `addresses` array requires objects with the following fields:
75
76
76
77
|`address`
77
78
|`string`
78
-
|An IP address and network prefix that you specify. For example, if you specify `10.10.21.10/24`, then the secondary network is assigned an IP address of `10.10.21.10` and the netmask is `255.255.255.0`.
79
+
|An IP address and network prefix that you specify. For example, if you specify `10.10.21.10/24`, the secondary network gets assigned an IP address of `10.10.21.10` and the netmask of `255.255.255.0`.
79
80
80
81
|`gateway`
81
82
|`string`
@@ -94,7 +95,7 @@ The `addresses` array requires objects with the following fields:
94
95
95
96
|`gw`
96
97
|`string`
97
-
|The gateway where network traffic is routed.
98
+
|The gateway that routes network traffic.
98
99
99
100
|====
100
101
@@ -105,7 +106,7 @@ The `addresses` array requires objects with the following fields:
105
106
106
107
|`nameservers`
107
108
|`array`
108
-
|An array of one or more IP addresses for to send DNS queries to.
109
+
|An array of one or more IP addresses where DNS queries get sent.
109
110
110
111
|`domain`
111
112
|`array`
@@ -165,33 +166,10 @@ spec:
165
166
"cniVersion": "0.3.1",
166
167
"type": "bridge",
167
168
"ipam": {
168
-
"type": "dhcp"
169
+
"type": "dhcp" <1>
169
170
}
170
171
}
171
172
# ...
172
173
----
174
+
<1> Specifies dynamic IP address (DHCP) assignment for the cluster.
173
175
174
-
The following table describes the configuration parameters for dynamic IP address address assignment with DHCP.
175
-
176
-
.`ipam` DHCP configuration object
177
-
[cols=".^2,.^2,.^6",options="header"]
178
-
|====
179
-
|Field|Type|Description
180
-
181
-
|`type`
182
-
|`string`
183
-
|The IPAM address type. The value `dhcp` is required.
184
-
185
-
|====
186
-
187
-
The following JSON example describes the configuration p for dynamic IP address address assignment with DHCP.
188
-
189
-
.Dynamic IP address (DHCP) assignment configuration example
Copy file name to clipboardExpand all lines: modules/nw-multus-whereabouts.adoc
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,7 @@
10
10
11
11
The Whereabouts CNI plugin helps the dynamic assignment of an IP address to a secondary network without the use of a DHCP server.
12
12
13
-
The Whereabouts CNI plugin also supports overlapping IP address ranges and configuration of the same CIDR range multiple times within separate `NetworkAttachmentDefinition` CRDs. This provides greater flexibility and management capabilities in multi-tenant environments.
13
+
The Whereabouts CNI plugin also supports overlapping IP address ranges and configuration of the same CIDR range multiple times within separate `NetworkAttachmentDefinition` CRDs. This provides greater flexibility and management capabilities in multitenant environments.
0 commit comments