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
. Save your changes and quit the text editor to commit your changes.
166
201
167
-
. Optional: Confirm that the CNO created the NetworkAttachmentDefinition CR by
168
-
running the following command. There might be a delay before the CNO creates the
169
-
CR.
202
+
. Confirm that the CNO created the NetworkAttachmentDefinition CR by running the following command. Replace `<namespace>` with the namespace that you specified when configuring the network attachment. There might be a delay before the CNO creates the CR.
170
203
+
171
204
----
172
205
$ oc get network-attachment-definitions -n <namespace>
The IP address management (IPAM) Container Network Interface (CNI) plug-in manages IP address assignment for other CNI plug-ins. You can configure ipam for either static IP address assignment or dynamic IP address assignment by using DHCP. The DHCP server you specify must be reachable from the additional network.
24
+
The ipam Container Network Interface (CNI) plug-in provides IP address management (IPAM) for other CNI plug-ins.
25
25
26
26
ifdef::json[]
27
-
The following JSON configuration object describes the parameters that you can set.
27
+
You can use the following methods for IP address assignment:
28
+
29
+
- Static assignment.
30
+
- Dynamic assignment through a DHCP server. The DHCP server you specify must be reachable from the additional network.
31
+
- Dynamic assignment through the Whereabouts IPAM CNI plug-in.
28
32
endif::json[]
29
33
30
34
ifdef::yaml[]
31
35
The following YAML configuration describes the parameters that you can set.
32
36
endif::yaml[]
33
37
38
+
////
34
39
IMPORTANT: If you set the `type` parameter to the `DHCP` value, you cannot set
35
40
any other parameters.
41
+
////
36
42
37
43
ifdef::json[]
38
-
.ipam CNI plug-in JSON configuration object
44
+
[id="nw-multus-static_{context}"]
45
+
== Static IP address assignment configuration
46
+
47
+
The following JSON describes the configuration for static IP address assignment:
48
+
49
+
.Static assignment configuration
39
50
[source,json]
40
51
----
41
52
{
42
53
"ipam": {
43
-
"type": "<type>", <1>
44
-
"addresses": [ <2>
54
+
"type": "static",
55
+
"addresses": [ <1>
45
56
{
46
-
"address": "<address>", <3>
47
-
"gateway": "<gateway>" <4>
57
+
"address": "<address>", <2>
58
+
"gateway": "<gateway>" <3>
48
59
}
49
60
],
50
-
"routes": [ <5>
61
+
"routes": [ <4>
51
62
{
52
-
"dst": "<dst>" <6>
53
-
"gw": "<gw>" <7>
63
+
"dst": "<dst>" <5>
64
+
"gw": "<gw>" <6>
54
65
}
55
66
],
56
-
"dns": { <8>
57
-
"nameservers": ["<nameserver>"], <9>
58
-
"domain": "<domain>", <10>
59
-
"search": ["<search_domain>"] <11>
67
+
"dns": { <7>
68
+
"nameservers": ["<nameserver>"], <8>
69
+
"domain": "<domain>", <9>
70
+
"search": ["<search_domain>"] <10>
60
71
}
61
72
}
62
73
}
63
74
----
64
-
<1> Specify `static` to configure the plug-in to manage IP address assignment.
65
-
Specify `DHCP` to allow a DHCP server to manage IP address assignment. You
66
-
cannot specify any additional parameters if you specify a value of `DHCP`.
67
-
68
-
<2> An array describing IP addresses to assign to the virtual interface. Both
75
+
<1> An array describing IP addresses to assign to the virtual interface. Both
69
76
IPv4 and IPv6 IP addresses are supported.
70
77
71
-
<3> A block of IP addresses that you specify in CIDR format to assign
72
-
to Pods on a worker node, such as `10.1.1.0/24`.
78
+
<2> An IP address that you specify.
73
79
74
-
<4> The default gateway to route egress network traffic to.
80
+
<3> The default gateway to route egress network traffic to.
75
81
76
-
<5> An array describing routes to configure inside the Pod.
82
+
<4> An array describing routes to configure inside the Pod.
77
83
78
-
<6> The IP address range in CIDR format.
84
+
<5> The IP address range in CIDR format.
79
85
80
-
<7> The gateway where network traffic is routed.
86
+
<6> The gateway where network traffic is routed.
81
87
82
-
<8> Optional: DNS configuration.
88
+
<7> Optional: DNS configuration.
83
89
84
-
<9> An of array of one or more IP addresses for to send DNS queries to.
90
+
<8> An of array of one or more IP addresses for to send DNS queries to.
85
91
86
-
<10> The default domain to append to a host name. For example, if the
92
+
<9> The default domain to append to a host name. For example, if the
87
93
domain is set to `example.com`, a DNS lookup query for `example-host` is
88
94
rewritten as `example-host.example.com`.
89
95
90
-
<11> An array of domain names to append to an unqualified host name,
96
+
<10> An array of domain names to append to an unqualified host name,
91
97
such as `example-host`, during a DNS lookup query.
92
98
99
+
[id="nw-multus-dhcp_{context}"]
100
+
== Dynamic IP address assignment configuration
101
+
102
+
The following JSON describes the configuration for dynamic IP address address assignment with DHCP:
103
+
104
+
.DHCP assignment configuration
105
+
[source,json]
106
+
----
107
+
{
108
+
"ipam": {
109
+
"type": "dhcp"
110
+
}
111
+
}
112
+
----
113
+
114
+
[id="nw-multus-whereabouts_{context}"]
115
+
== Dynamic IP address assignment configuration with Whereabouts
116
+
117
+
The Whereabouts CNI plug-in allows the dynamic assignment of an IP address to an additional network without the use of a DHCP server.
118
+
119
+
The following JSON describes the configuration for dynamic IP address assignment with Whereabouts:
120
+
121
+
.Whereabouts assignment configuration
122
+
[source,json]
123
+
----
124
+
{
125
+
"ipam": {
126
+
"type": "whereabouts",
127
+
"range": "<range>", <1>
128
+
"exclude": ["<exclude_part>, ..."], <2>
129
+
}
130
+
}
131
+
----
132
+
<1> Specify an IP address and range in CIDR notation. IP addresses are assigned from within this range of addresses.
133
+
<2> Optional: Specify a list of IP addresses and ranges in CIDR notation. IP addresses within an excluded address range are not assigned.
134
+
135
+
////
136
+
[NOTE]
137
+
=====
138
+
Whereabouts can be used for both IPv4 and IPv6 addresses.
139
+
=====
140
+
////
141
+
93
142
[id="nw-multus-static-example_{context}"]
94
143
== Static IP address assignment configuration example
95
144
@@ -109,22 +158,42 @@ You can configure ipam for static IP address assignment:
109
158
}
110
159
----
111
160
112
-
[id="nw-multus-dynamic-example_{context}"]
113
-
== Dynamic IP address assignment configuration example
161
+
[id="nw-multus-dhcp-example_{context}"]
162
+
== Dynamic IP address assignment configuration example using DHCP
114
163
115
164
You can configure ipam for DHCP:
116
165
117
166
[source,json]
118
167
----
119
168
{
120
169
"ipam": {
121
-
"type": "DHCP"
170
+
"type": "dhcp"
171
+
}
172
+
}
173
+
----
174
+
175
+
[id="nw-multus-whereabouts-example_{context}"]
176
+
== Dynamic IP address assignment configuration example using Whereabouts
177
+
178
+
You can configure ipam to use Whereabouts:
179
+
180
+
[source,json]
181
+
----
182
+
{
183
+
"ipam": {
184
+
"type": "whereabouts",
185
+
"range": "192.0.2.192/27",
186
+
"exclude": [
187
+
"192.0.2.192/30",
188
+
"192.0.2.196/32"
189
+
]
122
190
}
123
191
}
124
192
----
125
193
endif::json[]
126
194
127
-
// YAML uses collection and mapping to describe arrays and objects
195
+
// YAML configuration is only relevant to `simpleMacvlanConfig`
196
+
// This is limited by the fields that the CNO accepts
128
197
129
198
ifdef::yaml[]
130
199
.ipam CNI plug-in YAML configuration object
@@ -168,8 +237,7 @@ ipamConfig:
168
237
<1> A collection of mappings that define IP addresses to assign to the virtual
169
238
interface. Both IPv4 and IPv6 IP addresses are supported.
170
239
171
-
<2> A block of IP addresses that you specify in CIDR format to assign
172
-
to Pods on a worker node, such as `10.1.1.0/24`.
240
+
<2> An IP address that you specify.
173
241
174
242
<3> The default gateway to route egress network traffic to.
0 commit comments