Follow the 4 steps below to configure the bonding interface:
1. configure bonding driver, as well as the bonding mode and parameters using the configuration file /etc/modprobe.conf.
# grep bond0 /etc/modprobe.conf alias bond0 bonding options bond0 mode=1 miimon=100
2. configure the save interfaces of the bond using the respective network scripts.
# cat /etc/sysconfig/network-scripts/ifcfg-eth1 DEVICE=eth1 BOOTPROTO=none ONBOOT=yes MASTER=bond0 SLAVE=yes
# cat /etc/sysconfig/network-scripts/ifcfg-eth2 DEVICE=eth2 BOOTPROTO=none ONBOOT=yes MASTER=bond0 SLAVE=yes
3. configure bonding interface using the network script file /etc/sysconfig/network-scripts/ifcfg-bond0.
# cat /etc/sysconfig/network-scripts/ifcfg-bond0 DEVICE=bond0 MASTER=yes BOOTPROTO=dhcp ONBOOT=yes
4. activate bonding interface once you have completed all the above steps.
# ifup bond0
Please be very careful the bonding parameter settings on CentOS4/RHEL 4 is different than that on CentOS/RHEL 5. The “BONDING_OPTS” in ifcfg-XXX is not supported on CentOS/RHEL 4 system. For RHEL/CentOS 4 systems, the bonding parameters should always be set in /etc/modprobe.conf.
Note: For multiple bonding interfaces on CentOS/RHEL 4, “max_bonds” parameter should be used for those with same mode, and multiple driver instances should be used for those with different mode.