11.2.4. Channel Bonding Interfaces
bondingkernel 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.
bonding.txtfile in the kernel-doc package (see Section 31.9, “Additional Resources”).
22.214.171.124. Check if Bonding Kernel Module is Installed
~]#No visual output indicates the module was not running and has now been loaded. This activation will not persist across system restarts. See Section 31.7, “Persistent Module Loading” for an explanation of persistent module loading. Note that given a correct configuration file using the
modprobe --first-time bonding
BONDING_OPTSdirective, the bonding module will be loaded as required and therefore does not need to be loaded separately.
modprobe(8)man page for more command options and see Chapter 31, Working with Kernel Modules for information on loading and unloading modules.
126.96.36.199. Create a Channel Bonding Interface
ifcfg-bondN, replacing N with the number for the interface, such as
bondN, replacing N with the number for the interface. The
NM_CONTROLLEDdirective can be added to prevent NetworkManager from configuring this device.
Example 11.1. Example 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"
NM_CONTROLLED=nodirective, or set it to
yes, and add
SLAVEdirectives to their configuration files. The configuration files for each of the channel-bonded interfaces can be nearly identical.
Example 11.2. Example ifcfg-ethX bonded interface configuration file
eth1can be as follows:
DEVICE=ethX BOOTPROTO=none ONBOOT=yes MASTER=bond0 SLAVE=yes USERCTL=no NM_CONTROLLED=no
root, issue the following command:
service network restart
/proc/file by issuing a command in the following format:
cat /proc/net/bonding/bondNFor example:
cat /proc/net/bonding/bond0Ethernet Channel Bonding Driver: v3.6.0 (September 26, 2009) Bonding Mode: load balancing (round-robin) MII Status: down MII Polling Interval (ms): 0 Up Delay (ms): 0 Down Delay (ms): 0
BONDING_OPTS="directive in the
ifcfg-bondNinterface file. Do not specify options specific to a bond in
/etc/modprobe.d/bonding.conf, or in the deprecated
max_bondsparameter is not interface specific and therefore, if required, should be specified in
options bonding max_bonds=1However, the
max_bondsparameter should not be set when using
ifcfg-bondNfiles with the
BONDING_OPTSdirective as this directive will cause the network scripts to create the bond interfaces as required.
/etc/modprobe.d/bonding.confwill not take effect until the module is next loaded. A running module must first be unloaded. See Chapter 31, Working with Kernel Modules for more information on loading and unloading modules.
188.8.131.52.1. Creating Multiple Bonds
BONDING_OPTSdirective. This configuration method is used so that multiple bonding devices can have different configurations. To create multiple channel bonding interfaces, proceed as follows:
- Create multiple
ifcfg-bondNfiles with the
BONDING_OPTSdirective; this directive will cause the network scripts to create the bond interfaces as required.
- Create, or edit existing, interface configuration files to be bonded and include the
- Assign the interfaces to be bonded, the slave interfaces, to the channel bonding interfaces by means of the
Example 11.3. Example multiple ifcfg-bondN interface configuration files
DEVICE=bondN 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"
MASTER=bondNdirective. For example, continuing on from the example above, if two interfaces per bond are required, then for two bonds create four interface configuration files and assign the first two using
MASTER=bond0and the next two using