Home > Linux, Redhat, Uncategorized > RHEL 5 bonding configuration

RHEL 5 bonding configuration

To create interface bonding on a RHEL server, first pick the 2 or more interfaces you’d like to use.  For this example, I’ve chosen eth0 and eth1 an active/passive as the configuration.  Active/active is not recommended at this point, certain studies (which I can cite at the moment) have shown packets can come out of order and the assembly of them takes more time and processing than active/passive.

Create 3 files /etc/sysconfig/network-scripts/ifcfg-bond0:
DEVICE=bond0
USERCTL=no
ONBOOT=yes
BOOTPROTO=none
BROADCAST=172.25.111.255
NETWORK=172.25.111.0
NETMASK=255.255.255.0
GATEWAY=172.25.111.254
IPADDR=172.25.111.33

/etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
HWADDR=00:21:9B:A4:49:65
USERCTL=no
ONBOOT=no
BOOTPROTO=none
MASTER=bond0
SLAVE=yes
/etc/sysconfig/network-scripts/ifcfg-eth1
DEVICE=eth1
HWADDR=00:21:9B:A4:49:67
USERCTL=no
ONBOOT=no
BOOTPROTO=none
MASTER=bond0
SLAVE=yes

Add the following to /etc/modprobe.conf:
alias bond0 bonding
options bonding miimon=100 mode=active-backup

At this point, you can restart your network services or reboot.
#service network restart

To look at stats:
#ifconfig -a
#netstat -in
#cat /proc/net/bonding/bond0
Ethernet Channel Bonding Driver: v3.4.0 (October 7, 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): 0
Down Delay (ms): 0

Slave Interface: eth0
MII Status: up
Link Failure Count: 1
Permanent HW addr: 00:21:9b:a4:49:65

Slave Interface: eth1
MII Status: up
Link Failure Count: 0
Permanent HW addr: 00:21:9b:a4:49:67

Categories: Linux, Redhat, Uncategorized
  1. javeed A
    March 26, 2011 at 11:35 am

    Hi will,

    can you post vlan setup on top of bonding ?

    Thanks
    Javeed A

    • March 26, 2011 at 8:38 pm

      Hi Javeed,

      Ideally, when you set up bonding you should put an interface on separate switches or blades within a chasis. This allows for the purpose of high availability, in the case of either the switch or blade failing. You can obviously place the bonded interfaces on the same switch. For configuration of the VLANs, however, you have to have 2 switches interconnected and those ports on the same VLANs. For example, in Cisco, in its most basic form:

      Switch1
      #config t
      config>interface gig 0/1
      confg-int>switchport access vlan 100

      Switch2
      #config t
      config>interface gig 0/1
      confg-int>switchport access vlan 100

      I don’t show the configuration for configuration of the interconnect ports above, but you can reference cisco’s site for that. Let me know if you need additional info.

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: