Load balance in CentOS

1. Testing your system if the bonding driver is available

modprobe bonding miimon=100
ifconfig bond0 192.168.1.1 netmask 255.255.255.0
ifconfig eth0 down
ifconfig eth1 down
ifenslave bond0 eth0 eth1

2. Create the network configration file for next reboot

create /etc/sysconfig/network-scripts/ifcfg-bond0

DEVICE=bond0
BOOTPROTO=static
ONBOOT=yes
NETWORK=192.168.1.0
NETMASk=255.255.255.0
IPADDR=192.168.1.13
GATEWAY=192.168.1.1
USERCTL=no

edit /etc/sysconfig/network-scripts/ifcfg-eth0 and eth1

**** original config *****
MASTER=bond0
SLAVE=yes

load bonding driver to modprode

edit /etc/modprobe.conf add

****** original config ********
alias bond0 bonding
options bond0 miimon=100 mode=1

reboot system

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.