As user root:
Cd /etc/sysconfig/networking/devices and add soft links to the network-scripts ifcfg-* files so that system-config-networks gui will use same config files. Boot sequence will read networking devices prior to network-scripts and could cause problems.
/etc/sysconfig/networking/devices
ifcfg-bond0 -> /etc/sysconfig/network-scripts/ifcfg-bond0
ifcfg-bond1 -> /etc/sysconfig/network-scripts/ifcfg-bond1
ifcfg-bond2 -> /etc/sysconfig/network-scripts/ifcfg-bond2
ifcfg-eth0 -> /etc/sysconfig/network-scripts/ifcfg-eth0
ifcfg-eth1 -> /etc/sysconfig/network-scripts/ifcfg-eth1
ifcfg-eth2 -> /etc/sysconfig/network-scripts/ifcfg-eth2
ifcfg-eth3 -> /etc/sysconfig/network-scripts/ifcfg-eth3
ifcfg-eth4 -> /etc/sysconfig/network-scripts/ifcfg-eth4
ifcfg-eth5 -> /etc/sysconfig/network-scripts/ifcfg-eth5
- cd /etc/sysconfig/network-scripts
- Copy one of the existing ifcfg-eth<#> scripts to ifcfg-bond<#>
- cp ifcfg-eth0 ifcfg-bond0
- Edit the ifcfg-bond0, including your own network parameters
- Next, adjust each of the ifcfg-eth<#> interfaces to have them use the bond0 interface
- Note that ETHTOOL_OPTS are configured to ensure consistency with the configuration of the switch port
- First interface is ifcfg-eth0
- Next, edit the /etc/modprobe.conf file to add the bonding interface and associated options
Note: RHEL 3 = /etc/modules.conf
- RHEL 4, Update 3 and later:
# Note e1000 = Intel NIC bnx2 = BroadCom NIC Insure correct setting for your environment. max_bonds defaults to 2 bond devices in Linux changed to 8
alias eth0 e1000
alias eth1 e1000
alias eth2 e1000
alias eth3 e1000
alias eth4 bnx2
alias eth5 bnx2
alias bond0 bonding
alias bond1 bonding
alias bond2 bonding
options bonding max_bonds=8, mode=1, miimon=100
- The options line sets a timeout of 100ms after the detection of a link failure before the backup interface is brought online. Additionally, the mode setting is to use the high availability option to switch to the second port if the current port fails.
- Next check whether the bonding module is already active
- modprobe -l bonding
- /lib/modules/2.6.9-22.0.2.ELsmp/kernel/drivers/net/bonding/bonding.ko
- to install the bonding driver immediately:
- /sbin/insmod /lib/modules/2.6.9-22.0.2.ELsmp/kernel/drivers/net/bonding/bonding.ko miimon=100
- Recreate the initrd kernel < red = your currently booting initrd file>
mv /boot/initrd-2.4.21-32.ELsmp.img /boot/initrd-2.4.21-32.Elsmp_orig.img
mkinitrd /boot/initrd-`uname -r`.img `uname -r`
Restart the system…
- Use netstat –i to validate the bonding has started correctly
- Validate the settings by looking at the file:
- /proc/net/bonding/bond<n> file