mirror of
https://github.com/openshift/openshift-docs.git
synced 2026-02-05 12:46:18 +01:00
67 lines
1.7 KiB
Plaintext
67 lines
1.7 KiB
Plaintext
// Module included in the following assemblies:
|
|
//
|
|
// * networking/multiple_networks/secondary_networks/configuring-ip-secondary-nwt.adoc
|
|
// * networking/hardware_networks/configuring-sriov-net-attach.adoc
|
|
// * networking/hardware_networks/configuring-sriov-ib-attach.adoc
|
|
|
|
:_mod-docs-content-type: PROCEDURE
|
|
[id="nw-multus-configure-dualstack-ip-address_{context}"]
|
|
= Creating a configuration for assignment of dual-stack IP addresses dynamically
|
|
|
|
[role="_abstract"]
|
|
You can dynamically assign dual-stack IP addresses to a secondary network so that pods can communicate over both IPv4 and IPv6 addresses.
|
|
|
|
You can configure the following IP address assignment types in the `ipRanges` parameter:
|
|
|
|
* IPv4 addresses
|
|
* IPv6 addresses
|
|
* multiple IP address assignment
|
|
|
|
.Procedure
|
|
|
|
. Set `type` to `whereabouts`.
|
|
|
|
. Use `ipRanges` to allocate IP addresses as shown in the following example:
|
|
+
|
|
[source,yaml]
|
|
----
|
|
cniVersion: operator.openshift.io/v1
|
|
kind: Network
|
|
metadata:
|
|
name: cluster
|
|
spec:
|
|
additionalNetworks:
|
|
- name: whereabouts-shim
|
|
namespace: default
|
|
type: Raw
|
|
rawCNIConfig: |-
|
|
{
|
|
"name": "whereabouts-dual-stack",
|
|
"cniVersion": "0.3.1,
|
|
"type": "bridge",
|
|
"ipam": {
|
|
"type": "whereabouts",
|
|
"ipRanges": [
|
|
{"range": "192.168.10.0/24"},
|
|
{"range": "2001:db8::/64"}
|
|
]
|
|
}
|
|
}
|
|
|
|
----
|
|
|
|
. Attach the secondary network to a pod. For more information, see "Adding a pod to a secondary network".
|
|
|
|
.Verification
|
|
|
|
* Verify that all IP addresses got assigned to the network interfaces within the network namespace of a pod by entering the following command:
|
|
+
|
|
[source,yaml]
|
|
----
|
|
$ oc exec -it <pod_name> -- ip a
|
|
----
|
|
+
|
|
where:
|
|
+
|
|
`<podname>`:: The name of the pod.
|