Ensuring connectivity with active‑backup bonding on shared network adapters
![]()
With the default setting (fail_over_mac=0), an active‑backup bond uses a single MAC address for the bond and all lower interfaces, which can cause connectivity issues with shared network adapters.
If network bonding is implemented with shared network adapters, this can result in packets being forwarded to inactive lower interfaces, thus leading to loss of connectivity. Affected hardware includes OSA Express, RoCE Express and Network Express adapters.
Resolve this by setting the fail_over_mac option to active mode (fail_over_mac=1), which configures the bond to use the MAC address of the currently active lower interface while leaving the MAC addresses of lower interfaces intact.
The exact steps for setting fail_over_mac to active depend on the utility being used for network management.
Using NetworkManager
fail_over_mac to active for a new bond, issue a command of the following form:
# nmcli connection add type bond con-name <bond_name> ifname <bond_if_name> bond.options 'mode=active-backup,miimon=100,fail_over_mac=1'
fail_over_mac to active for an existing bond, issue a command of the following form:
# nmcli connection modify <bond_name> +bond.options 'fail_over_mac=1' # nmcli connection up <bond_name>
Using YaST
If the bond was configured using YaST on SUSE Linux Enterprise Server, fail_over_mac can be set to active as follows:
- In YaST, go to System -> Network Settings.
- Select the bond, select Edit, and go to the Bond Ports tab.
- Add the string "
fail_over_mac=1" to the Bond Driver Options field, separating it with a space character from any existing entry. - Click Next, and then OK, which generates the configuration files to be used by wicked.
Using wicked
On SUSE Linux Enterprise Server, a network bond can be set to use active fail_over_mac by manually configuring ifcfg scripts, which are then sourced by wicked. This can be done as follows:
- Open the file /etc/sysconfig/network/ifcfg-<bond_name> as root in a text editor.
- Append the string "
fail_over_mac=1" to the line starting with "BONDING_MODULE_OPTS", separating the string from the previous entries using a space.Example:BONDING_MODULE_OPTS="mode=active-backup miimon=100 fail_over_mac=1"
- Save the changes.
-
Bring the bond down and up to put the changes into effect:
# wicked ifdown <bond_name> # wicked ifup <bond_name>
Using Netplan
Ubuntu Server uses Netplan as its network manager. Netplan parses YAML configuration files under /etc/netplan/ to setup the network. A bond can be set up to use active fail_over_mac as follows:
- Open the machine's Netplan configuration YAML file, and locate the section for the specific bond.
- Add
under "parameters" as shown below. Use only spaces to indent the entry.fail-over-mac-policy: activenetwork: version: 2 renderer: networkd bonds: <bond_name>: dhcp4: yes interfaces: - <iface_name> - <iface_name> parameters: mode: active-backup primary: <iface_name> fail-over-mac-policy: active - Run netplan apply as root to apply the changes:
# netplan apply
Using ip
If no network manager, such as NetworkManager or wicked, is present on the machine, the ip utility, part of the iproute2 package, can be used to configure fail_over_mac for a bond.
fail_over_mac to active for a new bond, issue a command of the following form:
# ip link add <bond_name> type bond mode active-backup miimon 100 fail_over_mac active
fail_over_mac to active for an existing bond, issue a command of the following form:
# ip link set <bond_name> down # ip link set <bond_name> type bond fail_over_mac active # ip link set <bond_name> up
Verifying the setup
In /proc/net/bonding/<bond_name>, check if the string "(fail_over_mac active)" exists.
# cat /proc/net/bonding/<bond_name> | grep 'fail_over_mac active'
References
- Linux Channel Bonding Best Practices and Recommendations whitepaper: https://www.ibm.com/docs/en/linux-on-systems?topic=availability-linux-channel-bonding-best-practices-recommendations
- In the above Channel Bonding whitepaper, the fail_over_mac option: https://www.ibm.com/docs/en/linux-on-systems?topic=mode-option-fail-over-mac
- Network bonding on SUSE Linux Enterprise: https://documentation.suse.com/smart/network/html/network-bond-managing-devices/index.html
- Network bonding using netplan: https://netplan.readthedocs.io/en/stable/examples/#how-to-configure-interface-bonding
- Network bonding using NetworkManager: https://docs.redhat.com/en/documentation/red_hat_enterprise_linux/10/html/configuring_and_managing_networking/configuring-a-network-bond