Bonding in RedHat OS

In this article you will find information how to create bonding solution for Redhat.

1. Check if necessary modules are loaded:

# modprobe –list | grep bonding
/lib/modules/2.6.18-128.el5/kernel/drivers/net/bonding/bonding.ko

# modprobe –list | grep mii
/lib/modules/2.6.18-128.el5/kernel/drivers/net/mii.ko

2. Add following entry in /etc/modprobe:

# grep -i bond /etc/modprobe.conf
alias bond0 bonding

3. Create configuration files for interfaces:

– for our phisical interfaces we want to use for bonding:

# cat /etc/sysconfig/network-scripts/ifcfg-eth1
DEVICE=eth1
BOOTPROTO=static
ONBOOT=yes
USERCTL=no
MASTER=bond0
SLAVE=yes
NOZEROCONF=yes

# cat /etc/sysconfig/network-scripts/ifcfg-eth2
DEVICE=eth2
BOOTPROTO=static
ONBOOT=yes
USERCTL=no
MASTER=bond0
SLAVE=yes
NOZEROCONF=yes

– for our bond interface:

# cat /etc/sysconfig/network-scripts/ifcfg-bond0
DEVICE=bond0
BOOTPROTO=static
ONBOOT=yes
USERCTL=no
IPADDR=10.10.10.7
NETMASK=255.255.255.0
NOZEROCONF=yes
BONDING_OPTS=”mode=1 miimon=100″

Here u have some information what each mode in bonding options means:

mode=0 – balance-rr (round robin)
mode=1 – active-backup
mode=2 – balance-xor
mode=3 – broadcast
mode=4 – 802.3ad
mode=5 – balance-tlb (adaptive transmit load balancing)
mode=6 – balance-alb (adaptive load balancing)

4. Restart network services:

# service network restart

5. Check if bond interface is working:

# cat /proc/net/bonding/bond0
Ethernet Channel Bonding Driver: v3.2.4 (January 28, 2008)

Bonding Mode: fault-tolerance (active-backup)
Primary Slave: None
Currently Active Slave: eth1
MII Status: up
MII Polling Interval (ms): 100
Up Delay (ms): 60000
Down Delay (ms): 0

Slave Interface: eth1
MII Status: up
Link Failure Count: 0
Permanent HW addr: 00:XX:XX:XX:XX:d8

Slave Interface: eth2
MII Status: up
Link Failure Count: 0
Permanent HW addr: 00:XX:XX:XX:XX:e2

For more information go to:

http://www.linuxfoundation.org/collaborate/workgroups/networking/bonding

Leave a Response