Setting up channel bonding on RHEL 7
- NetworkManager with the GNOME control-center utility
- NetworkManager text user interface (nmtui) tool
- NetworkManager command line (nmcli) tool
You can also perform manual configuration using the command line interface.
The article "How do I configure a bonding device on Red Hat Enterprise Linux (RHEL)?" (https://access.redhat.com/articles/172483) provides examples showing how to use nmcli to set up a bond device.
In addition, Red Hat Customer Portal Labs provides a Network Bonding Helper for automatically generating a network bond, based on your environment and deployment goals. (See "Red Hat Network Bonding Helper" [https://access.redhat.com/labs/networkbondinghelper/]). This is a web application that helps generate configuration files with the setup information given by user.
The examples here use the NetworkManager text user interface (nmtui). For more details about the other tools, refer to the corresponding RHEL 7 documentation.
To start the NetworkManager text user interface tool, issue the command nmtui in a terminal window on RHEL 7. Within the tool, use the arrow, Tab, Enter, or Shift+Enter keys to step forwards and backwards. To create a new connection select Edit a connection, then <Add> and Bond, as shown in Figure 1.
The system displays the Edit Connection screen:
- Specify the bond device
- Choose the bonding mode with corresponding parameters
- Configure the IP address of the bond interface
In this example, we set bonding mode to Active Backup, the primary slave device is eth1, and MII monitor is used for link monitoring with a frequency of 1000ms.
To add additional slave devices for this bond, select Add on the right-hand side, and choose Ethernet type of connection. The system displays the following screen:
On this screen you can specify the device name of the slave and the unique MAC address. The slave device does not have an IP address.
After adding all the slave devices, select OK and quit the nmtui tool. The corresponding network configuration files are then generated automatically. The network configuration files are located under the directory /etc/sysconfig/network-scripts/.
Figure 4 shows the bonding master configuration file, ifcfg-bond0.
/etc/sysconfig/network-scripts/ifcfg-bond0:
DEVICE=bond0
TYPE=Bond
NAME=bond0
BONDING_MASTER=yes
IPADDR=192.0.2.0
PREFIX=24
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=no
UUID=7099226a-66ac-42a3-a41f-da8284e34838
ONBOOT=yes
BOOTPROTO=none
BONDING_OPTS="<bonding options>"
- BONDING_MASTER
- Is set to yes.
- IPADDR
- Shows the IP address configured in the bond connection menu.
- UUID
- Identifies a bond connection generated by NetworkManager.
- BONDING_OPTS
- Contains all the default values for bonding options. It is important to go through these options and customize them to fit your own system.
Figure 5 shows a slave device configuration file ifcfg-eth1.
/etc/sysconfig/network-scripts/ifcfg-eth1:
MACADDR=02:00:00:D3:FE:A0
SLAVE=yes
DEVICE=enccw0.0.b230
TYPE=Ethernet
NAME=eth1
UUID=4a8e29c7-fb39-457b-8edd-46cbc6ed49f9
ONBOOT=yes
MASTER=7099226a-66ac-42a3-a41f-da8284e34838
In this example file:
- MACADDR
- Specifies the unique MAC address of the slave device.
- UUID
- Specifies the unique UUID of the slave device.
- MASTER
- Specifies the UUID of the bonding master.