Skip to content

How to create a network bond for Elemental OS Machine

Article Number: 000022065

Environment

Rancher 2.9 >+

Elemental Operator  1.6 and 1.7

Procedure

Configuring NIC Teaming for OS Elemental

Overview

This article provides the procedure for configuring NIC Teaming (bonding) in SUSE Elemental OS. It includes an example configuration that can be adjusted to suit your specific environment.

Note: This procedure demonstrates the configuration using Elemental (the visual method) via the Rancher UI. Alternatively, Elemental (the command-line method) can be used to achieve the same result.


Prerequisites

  • Access to Rancher UI with appropriate administrative privileges.
  • Network interfaces available for bonding (e.g., eth0, eth1).
  • Familiarity with NetworkManager and cloud-config syntax.

Procedure

Step 1: Create or Update a Machine Registration Endpoint

  1. In the Rancher UI, navigate to:
    ☰ > OS Management > Registration Endpoints.
  2. Click Create or Edit Config.
  3. In the Cloud Configuration section, add or update the following configuration example.

Example Cloud Configuration




VLAN Configuration (Optional)

To configure the bonding interface to use a specific VLAN, use the following example instead of the standard bond configuration:

- files:
    - content: |
        [connection]
        id=bond-bond0
        type=bond
        interface-name=bond-bond0
        master=mgmt-br
        slave-type=bridge
        autoconnect=true
        [bond]
        miimon=1000
        mode=802.3ad
        xmit_hash_policy=layer3+4
        [ipv4]
        method=disabled
        [ipv6]
        method=disabled
      path: /etc/NetworkManager/system-connections/bond-bond0.nmconnection
      permissions: 384

  - files:
      - content: |
          [connection]
          id=bond-bond0.1234
          type=vlan
          interface-name=bond-bond0.1234
          autoconnect=true
          [vlan]
          id=1234
          parent=bond-bond0
          [ipv4]
          method=auto
          [ipv6]
          method=auto
        path: /etc/NetworkManager/system-connections/bond-bond0.1234.nmconnection
        permissions: 384


Additional Information

  • File permissions must restrict read and write access to the root user only.
    NetworkManager will refuse to load any connection profile with incorrect permissions.
  • Use octal notation to specify file permissions.
    For example:

root@SUSE-820564:~# echo $((0600)) 384 root@SUSE-820564:~# - Refer to the official documentation for additional details:
Static Network with NetworkManager Configurator

spec:
  config:
    cloud-config:
      stages:
        initramfs:
          - files:
              - content: |
                  [connection]
                  id=bond0-slave-eth0
                  type=ethernet
                  interface-name=eth0
                  master=bond0
                  slave-type=bond
                  autoconnect=true
                  [ethernet]
                  mac-address=00:50:56:bd:c3:f8
                path: /etc/NetworkManager/system-connections/bond0-slave-eth0.nmconnection
                permissions: 384

          - files:
              - content: |
                  [connection]
                  id=bond0-slave-eth1
                  type=ethernet
                  interface-name=eth1
                  master=bond0
                  slave-type=bond
                  autoconnect=true
                  [ethernet]
                  mac-address=00:50:56:bd:01:a2
                path: /etc/NetworkManager/system-connections/bond0-slave-eth1.nmconnection
                permissions: 384

          - files:
              - content: |
                  [connection]
                  id=bond-bond0
                  type=bond
                  interface-name=bond0
                  [bond]
                  miimon=100
                  mode=802.3ad
                  xmit_hash_policy=layer3+4
                  [ipv4]
                  method=auto
                  dns=10.144.53.53;10.144.53.54
                  [ipv6]
                  method=disabled
                path: /etc/NetworkManager/system-connections/bond-bond0.nmconnection
                permissions: 384

Summary

By following this procedure, you can successfully configure NIC teaming in OS Elemental using either the visual method (Rancher UI) or the command-line method. Adjust the sample configuration as needed for your environment, ensuring all permissions and parameters align with your network requirements.