Two days before I
implemented IP-bonding and Ethernet device load balance for my new server.
I followed the below
mentioned steps,
Step-1:
Create bond0 file,
# cd /etc/sysconfig/network-scripts
# vi ifcfg-bond0
DEVICE=bond0
BOOTPROTO=none
ONBOOT=yes
USERCTL=no
IPV6INIT=no
IPADDR=<ip-address>
NETMASK=<subnet-mask>
GATEWAY=<gateway-address>
#PEERDNS=no
BONDING_OPTS="mode=0
miimon=100"
TYPE=BOND
Save the file.
Note:-
BONDING_OPTS="mode=<value> miimon=<value>" --> by using this syntax we can implement load-balance, active-backup, Balance XOR, Broadcast, 802.3ad, Balance TLB, Balance ALB.
mode=0 (Balance Round Robin)
mode=1 (Active backup)
mode=2 (Balance XOR)
mode=3 (Broadcast)
mode=4 (802.3ad)
mode=5 (Balance TLB)
mode=6 (Balance ALB)
Step-2:
Edit ethernet
devices file which going to be configure for IP-bonding.
#vi ifcfg-eth1
TYPE=Ethernet
DEVICE=eth1
HWADDR=xx:xx:xx:xx:xx:xx
BOOTPROTO=none
ONBOOT=yes
USERCTL=no
IPV6INIT=no
MASTER=bond0
SLAVE=yes
PEERDNS=no
Save the file
Do same thing for
same for eth2 device.
Step-3:
Add the entry in below mentioned file,
# vi /etc/modprobe.conf
alias bond0 bonding
options bond0 mode=0 miimon=100
Save the file.
Note:-
Here in options
line you have to mention the mode value which is already given in ifcfg-bond0
file.
# modprobe –v bonding
# service network
restart
Step-4 :
Verify the ethernet
devices status in below mentioned location,
# cat
/proc/net/bonding/bond0
Ethernet Channel
Bonding Driver: v3.4.0-2 (October 7, 2008)
Bonding Mode: load balancing (round-robin) ß It’s configured for load balance.
MII Status: up
MII Polling
Interval (ms): 100
Up Delay (ms): 0
Down Delay (ms):
0
Slave Interface:
eth0
MII Status: up
Speed: 1000 Mbps
Duplex: full
Link Failure
Count: 0
Permanent HW
addr: xx:xx:xx:xx:xx:xx
Slave Interface: eth1
MII Status: up
Speed: 1000 Mbps
Duplex: full
Link Failure
Count: 0
Permanent HW
addr: xx:xx:xx:xx:xx:xx
# exit
Thanks for
sharing your valuable time J
.
Great Article :)
ReplyDelete