Introduction

Bonding (or channel bonding) is a technology enabled by the Linux kernel and Red Hat Enterprise Linux, that allows administrators to combine two or more network interfaces to form a single, logical “bonded” interface

for redundancy or increased throughput. The behavior of the bonded interfaces depends upon the mode; generally speaking, modes provide either hot standby or load balancing services. Additionally, they may provide link-integrity monitoring.

Configuring bonded devices on Red Hat Enterprise Linux 6

•In RHEL 6.5 and below, NetworkManager is unable to control a bonded interface. Due to this, the NetworkManager service needs to be instructed to not manage bonding and related interfaces. Therefore, all ifcfg files, for
bondX and ethY must contain this line:

NM_CONTROLLED=no

•To create a channel bonding interface, create a file in the /etc/sysconfig/network-scripts/ directory called ifcfg-bondX, replacing X with the number for the interface, such as 0. The contents of the file can be identical to whatever
type of interface is getting bonded, such as an Ethernet interface. The only difference is that the DEVICE= directive must be bondX, replacing X with the number for the interface.

The following is a sample channel bonding configuration file:
DEVICE=bond0
IPADDR=192.168.0.1
NETMASK=255.255.255.0
ONBOOT=yes
BOOTPROTO=none
USERCTL=no
BONDING_OPTS=”bonding parameters separated by spaces”
NM_CONTROLLED=no

•Bonding Parameters: The behavior of the bonded interfaces depends upon the mode. Mode 0 is the default value, which causes bonding to set all slaves of a round-robin bond to transmit packets in sequential order from the
first available slave through the last. For more information about the bonding modes, refer to The bonding modes supported in Red Hat Enterprise Linux.

•After the channel bonding interface is created, the network interfaces to be bound together must be configured by adding the MASTER= and SLAVE= directives to their configuration files. The configuration files for each of the
channel-bonded interfaces can be nearly identical. For example, if two Ethernet interfaces are being channel bonded, both eth0 and eth1 may look like the following example:
DEVICE=ethX
BOOTPROTO=none
ONBOOT=yes
MASTER=bond0
SLAVE=yes
USERCTL=no
NM_CONTROLLED=no

In this example, replace X with the numerical value for the interface.

•Restart the network service to bring the bond up:
# service network restart

Leave a Reply

Your email address will not be published. Required fields are marked *