Configure Aggregated Network Links on RHEL 7: Bonding and Teaming

Configure network bonding and teaming on RHEL 7.

Aggregated Network Links
There are two ways to configure aggregated network links on RHEL 7, via bonding or via teaming.

Network bonding enables two or more network interfaces to act as one, simultaneously increasing the bandwidth and providing redundancy.

Network teaming is designed to implement the concept in a different way by providing a small kernel driver to implement the fast handling of packet flows, and various user-space applications to do everything else in user space. The existing bonding driver is unaffected, network teaming is offered as an alternative and does not replace bonding in RHEL 7.

Before We Begin

We have two virtual machines in our lab, with two network interfaces each. One machine will be configured for network bonding, and one for network teaming. Basic IPv6 configuration for network teaming will be covered.

To avoid problems, we are going to configure networking from the console and not from Secure Shell (SSH). If we do something wrong, at least we won’t lose connectivity.

Caveat for VirtualBox

For those using VirtualBox to configure bonding or teaming, ensure that network adapters have promiscuous mode set to “Allow All”, and then enable promisc mode on the links, for example:

# ip link set eth0 promisc on
# ip link set eth1 promisc on

The above works OK for testing, but won’t persist after reboot. Either add to /etc/rc.local, or write a systemd service to handle it.

Configure Network Bonding

Ensure that the bonding module is loaded:

# modprobe bonding

While not required, feel free to check nmcli examples, where example 6 is about adding a bonding master and two slaves. You may find them useful.

# man 5 nmcli-examples

A bond interface can be created with either the nmcli or the nmtui utilities. We use nmcli since we find it faster and easier to use.

We are going to delete any existing network configuration to save ourselves some headache:

# nmcli c
enp0s8 00cb8299-feb9-55b6-a378-3fdc720e0bc6 802-3-ethernet enp0s8
enp0s17 8512e951-6012-c639-73b1-5b4d7b469f7f 802-3-ethernet enp0s17

We see that we have two network cards with predictable network interface names configured. Delete exiting configuration:

# nmcli c del enp0s8 enp0s17

Create a bonding interface named mybond0 with an active-backup mode:

# nmcli c add type bond ifname mybond0 con-name mybond0 mode active-backup