Dieser Inhalt ist in der von Ihnen ausgewählten Sprache nicht verfügbar.
11.2.4. Channel Bonding Interfaces
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.
Warning
Note
bonding.txt file in the kernel-doc package (see Section 31.9, “Additional Resources”).
11.2.4.1. Check if Bonding Kernel Module is Installed Link kopierenLink in die Zwischenablage kopiert!
root:
modprobe --first-time bonding
~]# modprobe --first-time bonding
BONDING_OPTS directive, the bonding module will be loaded as required and therefore does not need to be loaded separately.
modinfo bonding
~]$ modinfo bonding
modprobe(8) man page for more command options and see Chapter 31, Working with Kernel Modules for information on loading and unloading modules.
11.2.4.2. Create a Channel Bonding Interface Link kopierenLink in die Zwischenablage kopiert!
/etc/sysconfig/network-scripts/ directory called ifcfg-bondN, replacing N with the number for the interface, such as 0.
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.
Example 11.1. Example ifcfg-bond0 interface configuration file
NM_CONTROLLED=no directive, or set it to yes, and add TYPE=Bond and BONDING_MASTER=yes.
MASTER and SLAVE directives 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
eth0 and eth1 can be as follows:
root, issue the following command:
service network restart
~]# service network restart
/proc/ file by issuing a command in the following format: cat /proc/net/bonding/bondN
cat /proc/net/bonding/bondN
NM_CONTROLLED and the NM_BOND_VLAN_ENABLED directive.
Important
BONDING_OPTS="bonding parameters" directive in the ifcfg-bondN interface file. Do not specify options specific to a bond in /etc/modprobe.d/bonding.conf, or in the deprecated /etc/modprobe.conf file.
max_bonds parameter is not interface specific and therefore, if required, should be specified in /etc/modprobe.d/bonding.conf as follows:
options bonding max_bonds=1
options bonding max_bonds=1
max_bonds parameter should not be set when using ifcfg-bondN files with the BONDING_OPTS directive as this directive will cause the network scripts to create the bond interfaces as required.
/etc/modprobe.d/bonding.conf will 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.
11.2.4.2.1. Creating Multiple Bonds Link kopierenLink in die Zwischenablage kopiert!
BONDING_OPTS directive. 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 theBONDING_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
SLAVEdirective. - Assign the interfaces to be bonded, the slave interfaces, to the channel bonding interfaces by means of the
MASTERdirective.
Example 11.3. Example multiple ifcfg-bondN interface configuration files
ifcfg-bond0 and ifcfg-bond1.
MASTER=bondN directive. 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=bond0 and the next two using MASTER=bond1.