Linux allows us to bond multiple network interfaces into single interface using a special kernel module named bonding. The Linux bonding driver provides a method for combining multiple network interfaces into a single logical “bonded” interface.
sudo apt-get install ifenslave-2.6
Now, we have to make sure that the correct kernel module bonding is present, and loaded at boot time.
Edit /etc/modules file:
# /etc/modules: kernel modules to load at boot time. # # This file contains the names of kernel modules that should be loaded # at boot time, one per line. Lines beginning with "#" are ignored. # Parameters can be specified after the module name. bonding
As you can see we added “bonding”.
Now stop the network service:
service networking stop
Load the module (or reboot server):
sudo modprobe bonding
Now edit the interfaces configuration to support bonding and LACP.
auto eth1 iface eth1 inet manual bond-master bond0 auto eth2 iface eth2 inet manual bond-master bond0 auto bond0 iface bond0 inet static # For jumbo frames, change mtu to 9000 mtu 1500 address 126.96.36.199 netmask 255.255.255.0 network 188.8.131.52 broadcast 184.108.40.206 gateway 220.127.116.11 bond-miimon 100 bond-downdelay 200 bond-updelay 200 bond-mode 4 bond-slaves none
Now start the network service again
service networking start
Verify the bond is up:
Output should be something like:
~$ cat /proc/net/bonding/bond0 Ethernet Channel Bonding Driver: v3.7.1 (April 27, 2011) Bonding Mode: IEEE 802.3ad Dynamic link aggregation Transmit Hash Policy: layer2 (0) MII Status: up MII Polling Interval (ms): 0 Up Delay (ms): 0 Down Delay (ms): 0 802.3ad info LACP rate: slow Min links: 0 Aggregator selection policy (ad_select): stable Active Aggregator Info: Aggregator ID: 1 Number of ports: 2 Actor Key: 33 Partner Key: 2 Partner Mac Address: cc:e1:7f:2b:82:80 Slave Interface: eth1 MII Status: up Speed: 10000 Mbps Duplex: full Link Failure Count: 0 Permanent HW addr: 00:0c:29:4f:26:c5 Aggregator ID: 1 Slave queue ID: 0 Slave Interface: eth2 MII Status: up Speed: 10000 Mbps Duplex: full Link Failure Count: 0 Permanent HW addr: 00:0c:29:4f:26:cf Aggregator ID: 1 Slave queue ID: 0