9.2.4. Channel Bonding Interfaces
Red Hat Enterprise Linux allows administrators to bind multiple network interfaces together into a single channel using the
bonding
kernel module and a special network interface called a channel bonding interface.
Channel bonding enables two or more network interfaces to act as one,
simultaneously increasing the bandwidth and providing redundancy.
To create a channel bonding interface, create a file in the
/etc/sysconfig/network-scripts/
directory called ifcfg-bondN
, replacing N
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 is bondN
, replacing N
with the number for the interface. The NM_CONTROLLED
directive can be added to prevent NetworkManager from configuring this device.
The following is a sample channel bonding configuration file:
Example 9.1. Sample ifcfg-bond0 interface configuration file
DEVICE=bond0
IPADDR=192.168.1.1
NETMASK=255.255.255.0
ONBOOT=yes
BOOTPROTO=none
USERCTL=no
NM_CONTROLLED=no
BONDING_OPTS="bonding parameters separated by spaces
"
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=ethN
BOOTPROTO=none
ONBOOT=yes
MASTER=bond0
SLAVE=yes
USERCTL=no
NM_CONTROLLED=no
In this example, replace
N
with the numerical value for the interface.
Support for bonding was added to NetworkManager in Red Hat Enterprise Linux 6.3. See Section 9.2.1, “Ethernet Interfaces” for an explanation of
NM_CONTROLLED
and the NM_BOND_VLAN_ENABLED
directive.