Configure NIC bonding¶
You can configure L2 templates for the management cluster to set up a bond network interface for the PXE and management network.
This configuration must be applied to the bootstrap templates, before you run the bootstrap script to deploy the management cluster.
..admonition:: Configuration requirements for NIC bonding
Add at least two physical interfaces to each host in your management cluster.
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 the primary port. With this setting, the port becomes active in the fallback mode.
Configure the ports that connect servers to the PXE network with the PXE VLAN as native or untagged.
For reference configuration of network fabric in a baremetal-based cluster, see Network fabric.
To configure a bond interface that aggregates two interfaces for the PXE and management network:
In
kaas-bootstrap/templates/bm/ipam-objects.yaml.template
:Verify that only the following parameters for the declaration of
{{nic 0}}
and{{nic 1}}
are set, as shown in the example below:dhcp4
dhcp6
match
set-name
Remove other parameters.
Verify that the declaration of the bond interface
bond0
has theinterfaces
parameter listing both Ethernet interfaces.Verify that the node address in the PXE network (
ip "bond0:mgmt-pxe"
in the below example) is bound to the bond interface or to the virtual bridge interface tied to that bond.Caution
No VLAN ID must be configured for the PXE network from the host side.
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.
Important
Bond monitoring is disabled in Ubuntu by default. However, Mirantis highly recommends enabling it using Media Independent Interface (MII) monitoring by setting the
mii-monitor-interval
parameter to a non-zero value. For details, see Linux documentation: bond monitoring.
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 mii-monitor-interval: 100 dhcp4: false dhcp6: false addresses: - {{ ip "bond0:mgmt-pxe" }} vlans: k8s-lcm: id: SET_VLAN_ID link: bond0 addresses: - {{ ip "k8s-lcm:kaas-mgmt" }} nameservers: addresses: {{ nameservers_from_subnet "kaas-mgmt" }} routes: - to: 0.0.0.0/0 via: {{ gateway_from_subnet "kaas-mgmt" }} ...
Proceed to bootstrap your management cluster as described in Deploy a management cluster using CLI.