Configuration for a Bond CNI secondary network
The Bond Container Network Interface (Bond CNI) combines multiple network interfaces into a single logical interface inside a container, improving redundancy and fault tolerance. Red Hat OpenShift Container Platform supports Bond CNI only when using kernel-mode SR-IOV virtual functions (VFs).
The following table describes the configuration parameters for the Bond CNI plugin:
| Field | Type | Description |
|---|---|---|
|
|
The mandatory, unique identifier assigned to this CNI network attachment definition. It is used by the container runtime to select the correct network configuration and serves as the key for persistent resource state management, such as IP address allocations. |
|
|
The CNI specification version. A minimum version of |
|
|
Specifies the name of the CNI plugin to configure: |
|
|
Specifies the address resolution protocol (ARP) link monitoring frequency in milliseconds. This parameter defines how often the bond interface sends ARP requests to check the availability of its aggregated interfaces. |
|
|
Optional: Specifies the maximum transmission unit (MTU) of the bond. The default is |
|
|
Optional: Specifies the |
|
|
Specifies the bonding policy. The supported values are |
|
|
Specifies the transmit hash policy that the |
|
|
Optional: Specifies whether the network interfaces intended for bonding are expected to be created and available directly within the network namespace of the container when the bond starts. If |
|
|
Specifies the interfaces to be bonded. |
|
|
The configuration object for the IPAM CNI plugin. The plugin manages IP address assignment for the attachment definition. |
|
|
When you use SR-IOV virtual functions (VFs) from multiple physical functions (PFs) in an active-active bond (such as When you configure a switch LAG across multiple PFs, every workload using VFs from those PFs must use an active-active bonding policy. You cannot mix active-active bonds, active-backup bonds, or single-VF workloads on PFs participating in a switch LAG. When using an active-active bond across multiple PFs without an upstream switch LAG, traffic drops occur. Configurations using active-backup or single-VF workloads can only receive traffic on a single designated PF, so any frames routed by the switch to an alternate PF are silently dropped. |
Bond CNI plugin configuration example
The following example configures a secondary network named bond-net1:
{
"type": "bond",
"cniVersion": "0.3.1",
"name": "bond-net1",
"mode": "active-backup",
"failOverMac": 1,
"linksInContainer": true,
"miimon": "100",
"mtu": 1500,
"links": [
{"name": "net1"},
{"name": "net2"}
],
"ipam": {
"type": "host-local",
"subnet": "10.56.217.0/24",
"routes": [{
"dst": "0.0.0.0/0"
}],
"gateway": "10.56.217.1"
}
}
The following example configures a secondary network named bond-xor-net that uses the balance-xor mode with the xmitHashPolicy parameter enabled:
{
"type": "bond",
"cniVersion": "0.3.1",
"name": "bond-xor-net",
"mode": "balance-xor",
"xmitHashPolicy": "layer2+3",
"failOverMac": 0,
"linksInContainer": true,
"miimon": "100",
"mtu": 1500,
"links": [
{"name": "net1"},
{"name": "net2"}
],
"ipam": {
"type": "host-local",
"subnet": "10.57.218.0/24",
"routes": [{
"dst": "0.0.0.0/0"
}],
"gateway": "10.57.218.1"
}
}
-
xmitHashPolicy: This parameter dictates how outgoing network traffic is distributed across thenet1andnet2active member interfaces within the bond. The hashing algorithm combines layer 2 information, specifically source and destination MAC addresses, with layer 3 information, which includes source and destination IP addresses.