This kind of bonding provides load balancing and fault tolerance.
1. Compile the bonding driver as module. The advatage is, you can give some paramters to the driver.
Device Driver -> Networking Support -> <M> Bonding driver support
Compile your kernel
Code: Select all
cd /usr/src/linux
make && make modules_installCode: Select all
bonding miimon=100 mode=03. Edit /etc/conf.d/net . For a fixed IP, mine looks like the following. If you look at the
Code: Select all
iface_bond0="192.168.14.5 netmask 255.255.255.0 broadcast 192.168.14.255 up"
gateway="bond0/192.168.14.210"4. To install ifenslave.c, do
Code: Select all
cd /usr/src/linux/Documentation/networking
gcc -Wall -Wstrict-prototypes -O -I/usr/src/linux/include ifenslave.c -o ifenslave
cp ifenslave /sbin/ifenslaveCode: Select all
ifenslave bond0 eth0 eth1Code: Select all
ln -sf /etc/init.d/net.eth0 /etc/init.d/net.bond0Code: Select all
rc-update del eth0
rc-update del eth1
rc-update add bond0 default
9. After reboot ifconfig should look similar to this. If you look at the RX and TX values of eth0 and eth1, you can see a nice load balancing.
Code: Select all
bond0 Link encap:Ethernet HWaddr 00:11:22:33:44:55
inet addr:192.168.14.5 Bcast:192.168.14.255 Mask:255.255.255.0
UP BROADCAST RUNNING MASTER MULTICAST MTU:1500 Metric:1
RX packets:833 errors:0 dropped:0 overruns:0 frame:0
TX packets:226 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:360503 (352.0 Kb) TX bytes:16845 (16.4 Kb)
eth0 Link encap:Ethernet HWaddr 00:11:22:33:44:55
UP BROADCAST RUNNING SLAVE MULTICAST MTU:1500 Metric:1
RX packets:420 errors:0 dropped:0 overruns:0 frame:0
TX packets:113 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:181991 (177.7 Kb) TX bytes:8241 (8.0 Kb)
eth1 Link encap:Ethernet HWaddr 00:11:22:33:44:55
UP BROADCAST RUNNING SLAVE MULTICAST MTU:1500 Metric:1
RX packets:413 errors:0 dropped:0 overruns:0 frame:0
TX packets:113 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:178512 (174.3 Kb) TX bytes:8604 (8.4 Kb)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)Code: Select all
Password:
cata2950>enable
Password:
cata2950#
cata2950#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
cata2950(config)#interface range FastEthernet0/23 -24
cata2950(config-if-range)#channel-group 1 mode auto
Creating a port-channel interface Port-channel1
cata2950(config-if-range)#end
cata2950#show running-config
[...]
interface FastEthernet0/23
no ip address
channel-group 1 mode auto
!
interface FastEthernet0/24
no ip address
channel-group 1 mode auto
!
[...]
cata2950#copy running-config startup-config
Destination filename [startup-config]?
Building configuration...
[OK]
cata2950#exit
For more info about the bonding please read /usr/src/linux/Documentation/networking/bonding.txt
Fell free to add stuff or correct me.


