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


if you find any missing point in here, please let us know in comment section or tweet us at @linuxreaders. To get more articles like this, subscribe to our RSS feeds / Mails.

Article by Dhaval Thakar

Hi, I am Linux Admin. You'll find my articles small & without much descriptions.
Read 218 articles by
  • Lynn Wright

    Nice stuff on, i’ll be visiting more often

Archives

Categories

Page optimized by WP Minify WordPress Plugin