Jump to contentJump to page navigation: previous page [access key p]/next page [access key n]
documentation.suse.com / Documentação da SUSE Linux Enterprise High Availability Extension / Administration Guide / Configuration and administration / Network device bonding
Applies to SUSE Linux Enterprise High Availability 15 SP3

16 Network device bonding

For many systems, it is desirable to implement network connections that comply to more than the standard data security or availability requirements of a typical Ethernet device. In these cases, several Ethernet devices can be aggregated to a single bonding device.

The configuration of the bonding device is done by means of bonding module options. The behavior is determined through the mode of the bonding device. By default, this is mode=active-backup, which means that a different device will become active if the primary device fails.

When using Corosync, the bonding device is not managed by the cluster software. Therefore, the bonding device must be configured on each cluster node that might possibly need to access the bonding device.

16.1 Configuring bonding devices with YaST

To configure a bonding device, you need to have multiple Ethernet devices that can be aggregated to a single bonding device. Proceed as follows:

  1. Start YaST as root and select System › Network Settings.

  2. In the Network Settings, switch to the Overview tab, which shows the available devices.

  3. Check if the Ethernet devices to be aggregate to a bonding device have an IP address assigned. If yes, change it:

    1. Select the device to change and click Edit.

    2. In the Address tab of the Network Card Setup dialog that opens, select the option No Link and IP Setup (Bonding Slaves).

      Image
    3. Click Next to return to the Overview tab in the Network Settings dialog.

  4. To add a new bonding device:

    1. Click Add and set the Device Type to Bond. Proceed with Next.

    2. Select how to assign the IP address to the bonding device. Three methods are at your disposal:

      • No Link and IP Setup (Bonding Slaves)

      • Dynamic Address (with DHCP or Zeroconf)

      • Statically assigned IP Address

      Use the method that is appropriate for your environment. If Corosync manages virtual IP addresses, select Statically assigned IP Address and assign an IP address to the interface.

    3. Switch to the Bond Slaves tab.

    4. To select the Ethernet devices that you want to include into the bond, activate the check box in front of the respective devices.

      Image
    5. Edit the Bond Driver Options. The following modes are available:

      balance-rr

      Provides load balancing and fault tolerance, at the cost of out-of-order packet transmission. This may cause delays, for example, for TCP reassembly.

      active-backup

      Provides fault tolerance.

      balance-xor

      Provides load balancing and fault tolerance.

      broadcast

      Provides fault tolerance.

      802.3ad

      Provides dynamic link aggregation if supported by the connected switch.

      balance-tlb

      Provides load balancing for outgoing traffic.

      balance-alb

      Provides load balancing for incoming and outgoing traffic, if the network devices used allow the modifying of the network device's hardware address while in use.

    6. Make sure to add the parameter miimon=100 to Bond Driver Options. Without this parameter, the link is not checked regularly, so the bonding driver might continue to lose packets on a faulty link.

  5. Click Next and leave YaST with OK to finish the configuration of the bonding device. YaST writes the configuration to /etc/sysconfig/network/ifcfg-bondDEVICENUMBER.

16.2 Hotplugging devices into a bond

Sometimes it is necessary to replace an interface in a bond with another one, for example, if the respective network device constantly fails. The solution is to set up hotplugging. It is also necessary to change the udev rules to match the device by bus ID instead of by MAC address. This enables you to replace defective hardware (a network card in the same slot but with a different MAC address), if the hardware allows for that.

Procedure 16.1: Hotplugging devices into a bond with YaST

If you prefer manual configuration instead, refer to the SUSE Linux Enterprise Server Administration Guide, chapter Basic Networking, section Hotplugging of Bonding Slaves.

  1. Start YaST as root and select System › Network Settings.

  2. In the Network Settings, switch to the Overview tab, which shows the already configured devices. If devices are already configured in a bond, the Note column shows it.

    Image
  3. For each of the Ethernet devices that have been aggregated to a bonding device, execute the following steps:

    1. Select the device to change and click Edit. The Network Card Setup dialog opens.

    2. Switch to the General tab and make sure that Activate device is set to On Hotplug.

    3. Switch to the Hardware tab.

    4. For the Udev rules, click Change and select the BusID option.

    5. Click OK and Next to return to the Overview tab in the Network Settings dialog. If you click the Ethernet device entry now, the bottom pane shows the device's details, including the bus ID.

  4. Click OK to confirm your changes and leave the network settings.

At boot time, the network setup does not wait for the hotplug devices, but for the bond to become ready, which needs at least one available device. When one of the interfaces is removed from the system (unbind from NIC driver, rmmod of the NIC driver or true PCI hotplug removal), the Kernel removes it from the bond automatically. When a new card is added to the system (replacement of the hardware in the slot), udev renames it by applying the bus-based persistent name rule and calls ifup for it. The ifup call automatically joins it into the bond.

16.3 For more information

All modes and many options are explained in detail in the Linux Ethernet Bonding Driver HOWTO. The file can be found at /usr/src/linux/Documentation/networking/bonding.txt after you have installed the package kernel-source.

For High Availability setups, the following options described therein are especially important: miimon and use_carrier.