For bonding Network Load Balancing is commonly used in file servers, such as the three card, as a piece to use, to solve an IP address, traffic is too large, server network pressure is too big problem. For a file server, such as NFS or a Samba file server, none of the administrators can make the intranet's file server's IP address very many to solve the problem of network load. If in the intranet, file server for the management and application of convenience, mostly with the same IP address. For a local network of hundred m, the network pressure is great, especially for Samaba and NFS servers, when multiple users are using the file server at the same time. In order to solve the same IP address, break the traffic limit, after all, the network cable and network card throughput of the data is limited. If in the case of limited resources, realize Network load balance, the best way is bonding;
Another situation is that a server's network card failure or network connection accidentally disconnected, if done bonding can be converted to a network connection of another network card. ensure uninterrupted service.
The first thing to see is whether Linux supports BONDING,RHEL4, which is supported by default. (supported by most distributions)
# Modinfo Bonding
FileName:/lib/modules/2.6.18-8.el5/kernel/drivers/net/bonding/bonding.ko
Author:thomas Davis,
Tadavis@lbl.gov
and many others
Description:ethernet Channel bonding Driver, v3.0.3
version:3.0.3
License:gpl
Srcversion:2547d22885c2fdf28ef7d98
If there is a similar information output above, the instructions are supported.
If not, the kernel does not support bonding and the kernel needs to be recompiled
Steps to compile the kernel there's not much to write about here, in make Menuconfig
Find bonding Driver Support such a dialog box, select him.
If the module is compiled, you also need to mount the module. The method of mounting the bonding module;
[root@localhost#] modprobe bonding
If/sbin/ifenslave didn't, we'd have to compile it on his own.
[root@lin:/home/beinan#] Cd/usr/src/linux-2.6.20/documentation/networking
[root@lin:/home/networking#] Gcc-wall-wstrict-prototypes-o-i/usr/src/linux-2.6.20/include ifenslave.c-o ifenslave
[root@lin:/home/networking#] CP Ifenslave/sbin/ifenslave
1. #cp Ifcfg-etho Ifcfg-bond
2. #vim Ifcfg-bond
Device=bond0
ipaddr=192.168.100.2
netmask=255.255.255.0
Noboot=yes
Bootproto=none
Userctl=no
#vim Ifcfg-eth0
Device=eth0
Hwaddr=xxxxxxxxxx
Bootproto=none
Onboot=yes
Userctl=no
Master=bond0
Slave=yes
Type=ethernet
#vim ifcfg-eth1
Device=eth1
Hwaddr=xxxxxxxxxx
Bootproto=none
Onboot=yes
Userctl=no
Master=bond0
Slave=yes
Type=ethernet