Configure NIC bonding¶
You can configure L2 templates for the management cluster to set up a bond network interface for the PXE/management network.
This configuration must be applied to the bootstrap templates, before you run the bootstrap script to deploy the management cluster.
Caution
This configuration requires each host in your management cluster to have at least two physical interfaces.
Connect at least two interfaces per host to an Ethernet switch that supports Link Aggregation Control Protocol (LACP) port groups and LACP fallback.
Configure an LACP group on the ports connected to the NICs of a host.
Configure the LACP fallback on the port group to ensure that the host can boot over the PXE network before the bond interface is set up on the host operating system.
Configure server BIOS for both NICs of a bond to be PXE-enabled.
If the server does not support booting from multiple NICs, configure the port of the LACP group that is connected to the PXE-enabled NIC of a server to be primary port. With this setting, the port becomes active in the fallback mode.
To configure a bond interface that aggregates two interfaces for the PXE/Management network:
In
kaas-bootstrap/templates/bm/ipam-objects.yaml.template
:Configure only the following parameters for the declaration of
{{nic 0}}
, as shown in the example below:dhcp4
dhcp6
match
set-name
Remove other parameters.
Add the declaration of the second NIC
{{nic 1}}
to be added to the bond interface:Specify
match:macaddress: {{mac 1}}
to match the MAC of the desired NIC.Specify
set-name: {{nic 1}}
to ensure the correct name of the NIC.
Add the declaration of the bond interface
bond0
. It must have theinterfaces
parameter listing both Ethernet interfaces.Set the
interfaces
parameter of the management network bridge (k8s-lcm
in the example below) to includebond0
.Since Container Cloud 2.20.0 and 2.20.1 for MOSK 22.4, each node of every cluster must have only one IP address in the LCM network that is allocated from one of the
Subnet
objects having theipam/SVC-k8s-lcm
label defined. Therefore, allSubnet
objects used for LCM networks must have theipam/SVC-k8s-lcm
label defined.Before Container Cloud 2.20.0 and since MOSK 22.2, you can use any interface name for the LCM network traffic. The
Subnet
objects for the LCM network must have theipam/SVC-k8s-lcm
label. For details, see Service labels and their life cycle.Set the
addresses
,gateway4
, andnameservers
fields of the management network bridge to fetch data from thekaas-mgmt
subnet.Configure bonding options using the
parameters
field. The only mandatory option ismode
. See the example below for details.Note
You can set any mode supported by netplan and your hardware.
Verify your configuration using the following example:
kind: L2Template metadata: name: kaas-mgmt ... spec: ... l3Layout: - subnetName: kaas-mgmt scope: namespace npTemplate: | version: 2 ethernets: {{nic 0}}: dhcp4: false dhcp6: false match: macaddress: {{mac 0}} set-name: {{nic 0}} {{nic 1}}: dhcp4: false dhcp6: false match: macaddress: {{mac 1}} set-name: {{nic 1}} bonds: bond0: interfaces: - {{nic 0}} - {{nic 1}} parameters: mode: 802.3ad dhcp4: false dhcp6: false bridges: k8s-lcm: interfaces: [bond0] addresses: - {{ip "k8s-lcm:kaas-mgmt"}} gateway4: {{gateway_from_subnet "kaas-mgmt"}} nameservers: addresses: {{nameservers_from_subnet "kaas-mgmt"}} ...
Proceed to bootstrap your management cluster as described in Bootstrap a management cluster.