This documentation is for a release that is no longer maintained
See documentation for the latest supported version 3 or the latest supported version 4.Dieser Inhalt ist in der von Ihnen ausgewählten Sprache nicht verfügbar.
Chapter 11. Network configuration
This section describes the basics of network configuration using the Assisted Installer.
11.1. Cluster networking Link kopierenLink in die Zwischenablage kopiert!
There are various network types and addresses used by OpenShift and listed in the table below.
Type | DNS | Description |
---|---|---|
| The IP address pools from which Pod IP addresses are allocated. | |
| The IP address pool for services. | |
| The IP address blocks for machines forming the cluster. | |
|
| The VIP to use for API communication. This setting must either be provided or pre-configured in the DNS so that the default name resolves correctly. If you are deploying with dual-stack networking, this must be the IPv4 address. |
|
|
The VIPs to use for API communication. This setting must either be provided or pre-configured in the DNS so that the default name resolves correctly. If using dual stack networking, the first address must be the IPv4 address and the second address must be the IPv6 address. You must also set the |
|
| The VIP to use for ingress traffic. If you are deploying with dual-stack networking, this must be the IPv4 address. |
|
|
The VIPs to use for ingress traffic. If you are deploying with dual-stack networking, the first address must be the IPv4 address and the second address must be the IPv6 address. You must also set the |
OpenShift Container Platform 4.12 introduces the new apiVIPs
and ingressVIPs
settings to accept multiple IP addresses for dual-stack networking. When using dual-stack networking, the first IP address must be the IPv4 address and the second IP address must be the IPv6 address. The new settings will replace apiVIP
and IngressVIP
, but you must set both the new and old settings when modifying the configuration using the API.
Depending on the desired network stack, you can choose different network controllers. Currently, the Assisted Service can deploy OpenShift Container Platform clusters using one of the following configurations:
- IPv4
- IPv6
- Dual-stack (IPv4 + IPv6)
Supported network controllers depend on the selected stack and are summarized in the table below. For a detailed Container Network Interface (CNI) network provider feature comparison, refer to the OCP Networking documentation.
Stack | SDN | OVN |
---|---|---|
IPv4 | Yes | Yes |
IPv6 | No | Yes |
Dual-stack | No | Yes |
OVN is the default Container Network Interface (CNI) in OpenShift Container Platform 4.12 and later releases.
11.1.1. Limitations Link kopierenLink in die Zwischenablage kopiert!
11.1.1.1. SDN Link kopierenLink in die Zwischenablage kopiert!
- With Single Node OpenShift (SNO), the SDN controller is not supported.
- The SDN controller does not support IPv6.
11.1.1.2. OVN-Kubernetes Link kopierenLink in die Zwischenablage kopiert!
Please see the OVN-Kubernetes limitations section in the OCP documentation.
11.1.2. Cluster network Link kopierenLink in die Zwischenablage kopiert!
The cluster network is a network from which every Pod deployed in the cluster gets its IP address. Given that the workload may live across many nodes forming the cluster, it’s important for the network provider to be able to easily find an individual node based on the Pod’s IP address. To do this, clusterNetwork.cidr
is further split into subnets of the size defined in clusterNetwork.hostPrefix
.
The host prefix specifies a length of the subnet assigned to each individual node in the cluster. An example of how a cluster may assign addresses for the multi-node cluster:
--- clusterNetwork: - cidr: 10.128.0.0/14 hostPrefix: 23 ---
---
clusterNetwork:
- cidr: 10.128.0.0/14
hostPrefix: 23
---
Creating a 3-node cluster using the snippet above may create the following network topology:
-
Pods scheduled in node #1 get IPs from
10.128.0.0/23
-
Pods scheduled in node #2 get IPs from
10.128.2.0/23
-
Pods scheduled in node #3 get IPs from
10.128.4.0/23
Explaining OVN-K8s internals is out of scope for this document, but the pattern described above provides a way to route Pod-to-Pod traffic between different nodes without keeping a big list of mapping between Pods and their corresponding nodes.
11.1.3. Machine network Link kopierenLink in die Zwischenablage kopiert!
The machine network is a network used by all the hosts forming the cluster to communicate with each other. This is also the subnet that must include the API and Ingress VIPs.
11.1.4. SNO compared to multi-node cluster Link kopierenLink in die Zwischenablage kopiert!
Depending on whether you are deploying a Single Node OpenShift or a multi-node cluster, different values are mandatory. The table below explains this in more detail.
Parameter | SNO | Multi-Node Cluster with DHCP mode | Multi-Node Cluster without DHCP mode |
---|---|---|---|
| Required | Required | Required |
| Required | Required | Required |
| Auto-assign possible (*) | Auto-assign possible (*) | Auto-assign possible (*) |
| Forbidden | Forbidden | Required |
| Forbidden | Forbidden | Required in 4.12 and later releases |
| Forbidden | Forbidden | Required |
| Forbidden | Forbidden | Required in 4.12 and later releases |
(*) Auto assignment of the machine network CIDR happens if there is only a single host network. Otherwise you need to specify it explicitly.
11.1.5. Air-gapped environments Link kopierenLink in die Zwischenablage kopiert!
The workflow for deploying a cluster without Internet access has some prerequisites which are out of scope of this document. You may consult the Zero Touch Provisioning the hard way Git repository for some insights.
11.2. DHCP VIP allocation Link kopierenLink in die Zwischenablage kopiert!
The VIP DHCP allocation is a feature allowing users to skip the requirement of manually providing virtual IPs for API and Ingress by leveraging the ability of a service to automatically assign those IP addresses from the DHCP server.
If you enable the feature, instead of using api_vips
and ingress_vips
from the cluster configuration, the service will send a lease allocation request and based on the reply it will use VIPs accordingly. The service will allocate the IP addresses from the Machine Network.
Please note this is not an OpenShift Container Platform feature and it has been implemented in the Assisted Service to make the configuration easier.
11.2.1. Example payload to enable autoallocation Link kopierenLink in die Zwischenablage kopiert!
11.2.2. Example payload to disable autoallocation Link kopierenLink in die Zwischenablage kopiert!
11.4. Understanding differences between User Managed Networking and Cluster Managed Networking Link kopierenLink in die Zwischenablage kopiert!
User managed networking is a feature in the Assisted Installer that allows customers with non-standard network topologies to deploy OpenShift Container Platform clusters. Examples include:
-
Customers with an external load balancer who do not want to use
keepalived
and VRRP for handling VIP addressses. - Deployments with cluster nodes distributed across many distinct L2 network segments.
11.4.1. Validations Link kopierenLink in die Zwischenablage kopiert!
There are various network validations happening in the Assisted Installer before it allows the installation to start. When you enable User Managed Networking, the following validations change:
- L3 connectivity check (ICMP) is performed instead of L2 check (ARP)
11.5. Static network configuration Link kopierenLink in die Zwischenablage kopiert!
You may use static network configurations when generating or updating the discovery ISO.
11.5.1. Prerequisites Link kopierenLink in die Zwischenablage kopiert!
- You are familiar with NMState.
11.5.2. NMState configuration Link kopierenLink in die Zwischenablage kopiert!
The NMState file in YAML format specifies the desired network configuration for the host. It has the logical names of the interfaces that will be replaced with the actual name of the interface at discovery time.
11.5.2.1. Example of NMState configuration Link kopierenLink in die Zwischenablage kopiert!
11.5.3. MAC interface mapping Link kopierenLink in die Zwischenablage kopiert!
MAC interface map is an attribute that maps logical interfaces defined in the NMState configuration with the actual interfaces present on the host.
The mapping should always use physical interfaces present on the host. For example, when the NMState configuration defines a bond or VLAN, the mapping should only contain an entry for parent interfaces.
11.5.3.1. Example of MAC interface mapping Link kopierenLink in die Zwischenablage kopiert!
11.5.4. Additional NMState configuration examples Link kopierenLink in die Zwischenablage kopiert!
The examples below are only meant to show a partial configuration. They are not meant to be used as-is, and you should always adjust to the environment where they will be used. If used incorrectly, they may leave your machines with no network connectivity.
11.5.4.1. Tagged VLAN Link kopierenLink in die Zwischenablage kopiert!
11.5.4.2. Network bond Link kopierenLink in die Zwischenablage kopiert!
11.6. Applying a static network configuration with the API Link kopierenLink in die Zwischenablage kopiert!
You can apply a static network configuration using the Assisted Installer API.
Prerequisites
- You have created an infrastructure environment using the API or have created a cluster using the UI.
-
You have your infrastructure environment ID exported in your shell as
$INFRA_ENV_ID
. -
You have credentials to use when accessing the API and have exported a token as
$API_TOKEN
in your shell. -
You have YAML files with a static network configuration available as
server-a.yaml
andserver-b.yaml
.
Procedure
Create a temporary file
/tmp/request-body.txt
with the API request:Copy to Clipboard Copied! Toggle word wrap Toggle overflow Refresh the API token:
source refresh-token
$ source refresh-token
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Send the request to the Assisted Service API endpoint:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
11.8. Converting to dual-stack networking Link kopierenLink in die Zwischenablage kopiert!
Dual-stack IPv4/IPv6 configuration allows deployment of a cluster with pods residing in both IPv4 and IPv6 subnets.
11.8.1. Prerequisites Link kopierenLink in die Zwischenablage kopiert!
- You are familiar with OVN-K8s documentation
11.8.2. Example payload for Single Node OpenShift Link kopierenLink in die Zwischenablage kopiert!
11.8.3. Example payload for an OpenShift Container Platform cluster consisting of many nodes Link kopierenLink in die Zwischenablage kopiert!
11.8.4. Limitations Link kopierenLink in die Zwischenablage kopiert!
The api_vips
IP address and ingress_vips
IP address settings must be of the primary IP address family when using dual-stack networking, which must be IPv4 addresses. Currently, Red Hat does not support dual-stack VIPs or dual-stack networking with IPv6 as the primary IP address family. Red Hat supports dual-stack networking with IPv4 as the primary IP address family and IPv6 as the secondary IP address family. Therefore, you must place the IPv4 entries before the IPv6 entries when entering the IP address values.