This article help you to configure bonding on your server (Debian/Ubuntu)
Firstable, update list of packedges from the repositories :# apt-get update
To use network bonding mechanism in Ubuntu/Debian based Linux systems, you need to install the bonding kernel module :
# modprobe bonding
# lsmod | grep bond
Install "ifenslave" package by issuing the below command :
# apt-get install ifenslave
Further need to change network interface file and modules file, after that reboot system. Bonding will be successfully configured. In example below the name of two network interfaces is eno1 and eno2.
(/etc/network/interfaces):
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
source /etc/network/interfaces.d/*
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
#allow-hotplug eno1
auto bond0
iface bond0 inet static
slaves eno1 eno2
#iface eno1 inet static
address 192.168.1.10/25
gateway 192.168.1.1
# dns-* options are implemented by the resolvconf package, if installed
dns-nameservers 8.8.8.8 8.8.4.4
dns-search ugb.ee
bond_mode 802.3ad
bond_miimon 100
bond_downdelay 200
bond_updelay 200
bond-lacp-rate 1
bond-xmit-hash-policy layer2+3
(/etc/modules):
# /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.
bonding
By checking traffic from network interface we recommend use utility "iftop":
# apt-get install iftop
# iftop -i bond0
# iftop -i eno1
# iftop -i eno2
Details about bond interface can be obtained by displaying the content of the below kernel file using cat command as shown :
# cat /proc/net/bonding/bond0