Easiest way for Interface Bonding – CentOS

There is preferred way of bonding using ifcfg- files.
But I prefer following method as it is very easy to setup.

Here I am using 192.168.3.2 for the bond0.
eth0 & eth1 are used for bonding.
We’ll enter following lines in /etc/rc.local

modprobe bonding mode=balance-rr miimon=100
ifconfig bond0 192.168.3.2 netmask 255.255.255.0 up
ifenslave bond0 eth0
ifenslave bond0 eth1
route add -net 0.0.0.0 netmask 0.0.0.0 gw 192.168.3.1

To verify bonding

cat /proc/net/bonding/bond0
Ethernet Channel Bonding Driver: v3.4.0 (October 7, 2008)
 
Bonding Mode: load balancing (round-robin)
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: 0
Permanent HW addr: 00:19:5b:fd:0f:e7
 
Slave Interface: eth1
MII Status: up
Link Failure Count: 0
Permanent HW addr: 00:16:76:d2:c7:8d

One Comments

  1. Lynn Wright says:

    Nice stuff on, i’ll be visiting more often

    Leave a Reply

    Your email address will not be published. Required fields are marked *

    *

    You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="" highlight="">

    Archives

    Categories

    Page optimized by WP Minify WordPress Plugin