Bonding Question

Latest response

Can you edit an existing bond that is configured without loosing connections? We have a host that is not working after a network change and cannot take another host being down.

Also, do you need to have the network ports on the switch in a trunk group? We are using HP switches

Responses

What is the change that you wish to make to your bond(s)?

You can get a nice overview of your bond-specific settings, for e.g. bond0:

cat /proc/netb/bonding/bond0

At least some things can be changed using the pseudo-files located in /sys/class/net/bond*/bonding directory. For example, if your bond0 (made of eth0 and eth1) is configured in mode 1 (active-backup), with eth0 designated as its primary interface, you could switch it over to eth1 with:

echo eth1 > /sys/class/net/bond0/bonding/primary

If eth1 has a valid link and/or satisfies the arp_probe requirements you may have set up for this bond, this would cause the bond to immediately switch to using eth1 as the primary active interface.

Obviously, if you're connected to the server using the bond you're going to configure, you might cause your own connection to break. And if some bond is not working at all, it is unlikely to have any connections on it.

In HP switch terminology, "a (static) trunk group" seems to be a way to manually set up the switch-side equivalent of Linux bonds. This would seem to be a close equivalent of a Linux bond in balance-tlb or balance-xor mode, according to a bit of Googling.

The alternative is 802.3ad dynamic link aggregation, which corresponds to Linux bonding mode 4. If you are using dynamic link aggregation, then on Linux side the bond should be set to mode 4 (= 802.3ad), and vice versa. Then the switch should automatically create the trunk groups for you.

If you aren't using dynamic link aggregation on the switch, you could in theory use any bonding mode other than mode 4, and most of those won't depend on trunk groups being configured on the switch.

However, some switches have advanced features that cause the switch to not like the behavior of some Linux bonding modes. For example, bonding mode 0 (balance-rr) causes some switches to detect the MAC address of the bond as "flapping" between the switch ports connected to the bond, and flag that as a fault.

Some address hijacking protection features on the switch could also interfere with the bonding modes. In this case, setting up the corresponding trunk group on the switch might let the switch "know what is going on" and avoid false alarms.

Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.