Network Enablers in Secondary Networks
Using the Multus container network interface (CNI), you can configure secondary networks for use between Network Enabler (NE) pods. These networks can also be used by a signal transfer point (STP). Enable Multus in base.yaml by adding the following global feature configuration:
global:
features:
multusCNI: true
Provide Multus configuration details in the network-enabler.secondaryNetworks.name[x].cni
property to create a secondary network
name in NE pod x, which assigns a static IP address. This IP address must be used to configure
network-enabler.secondaryNetworks.name[x].address
.
For information about secondary network configuration options, see the discussion about configuring an additional network at the OpenShift website.
The CNI must be configured so that the IP address assigned by the secondary network is accessible by other NE pods in the cluster. If these secondary networks are to be used by the STP, then the CNI configuration must also allow this IP address to be accessible outside of the cluster.
The secondary network name is not important except to distinguish between multiple secondary networks. You can configure more than one secondary network for each NE pod.
When an NE pod has two multus-managed networks, each network must be on a physically different network interface card (NIC). That way when a NIC fails, both networks are not lost. The default
network-enabler.affinity
configuration ensures that NE pods each run on their own node.
For example, update the network-enabler.yaml file used in earlier examples to add secondary networks:
network-enabler:
secondaryNetworks:
name_1:
- address: <IP address which will be assigned to the network-enabler-0 pod by the network-enabler.secondaryNetworks.name_1[0].cni CNI configuration>
cni: <CNI configuration which will assign the IP address network-enabler.secondaryNetworks.<name 1>[0].address to the network-enabler-0 pod>
- address: <IP address which will be assigned to the network-enabler-1 pod by the network-enabler.secondaryNetworks.name_1>[1].cni CNI configuration>
cni: <CNI configuration which will assign the IP address network-enabler.secondaryNetworks.<name 1>[1].address to the network-enabler-1 pod>
name_2:
- address: <IP address which will be assigned to the network-enabler-0 pod by the network-enabler.secondaryNetworks.name_2[0].cni CNI configuration>
cni: <CNI configuration which will assign the IP address network-enabler.secondaryNetworks.name_2[0].address to the network-enabler-0 pod>
- address: <IP address which will be assigned to the network-enabler-1 pod by the network-enabler.secondaryNetworks.name_2[1].cni CNI configuration>
cni: <CNI configuration which will assign the IP address network-enabler.secondaryNetworks.name_2[1].address to the network-enabler-1 pod>
network-enabler.secondaryNetworks.name
must equal network-enabler.replicaCount
, which defaults to
2.For example:
network-enabler:
secondaryNetworks:
mu-net1:
- address: 10.10.230.208
cni:
cniVersion: 0.3.1
type: macvlan
master: ens1f1
ipam:
type: static
addresses: [
{
address: 10.10.230.208/24,
gateway: 10.10.230.1
}
]
- address: 10.10.230.209
cni:
cniVersion: 0.3.1
type: macvlan
master: ens1f1
ipam:
type: static
addresses: [
{
address: 10.10.230.209/24,
gateway: 10.10.230.1
}
]
mu-net2:
- address: 10.10.240.208
cni:
cniVersion: 0.3.1
type: macvlan
master: ens1f1
ipam:
type: static
addresses: [
{
address: 10.10.240.208/24,
gateway: 10.10.240.1
}
]
- address: 10.10.240.209
cni:
cniVersion: 0.3.1
type: macvlan
master: ens1f1
ipam:
type: static
addresses: [
{
address: 10.10.240.209/24,
gateway: 10.10.240.1
}
]
This creates the following on the first NE pod:
- One secondary network with IP 10.10.230.208
- Another secondary network with IP 10.10.240.208
This also creates the following on the second NE pod:
- One secondary network with IP 10.10.230.209
- Another secondary network with IP 10.10.240.209