How To Configure Bonding Interface on Ubuntu 16.04 LTS
In this tutorial we will show you how to configure bonding interface on Ubuntu 16.04 LTS server. Using bonding interface method you can push your network trafict based on your lan interface you have, for example we will use 2 gigabit lancard connect to cisco manageble switch with have been configured for LACP, but in this tutorial we will only cover in linux configuration only. I have use in production server and i got troughput 2 gigabit/second with 2 lan card.
This article assumes you have at least basic knowledge of linux and networking, know how to use the shell, root user or non-root user account with sudo privileges set up on your server.
Step 1 – Update repositories list
First we need to update repository database using these command below
sudo apt-get update
Step 2 – Install additional module
Type the following command
sudo apt install ifenslave bridge-utils
Step 3 – Interface configuration
Before we make cahnges in networ configuration , make sure you backup your network config file using these command.
sudo cp /etc/network/interfaces /etc/network/interfaces.backup
Edit /etc/network/interfaces , assumes you have interface with name eth0 and eth1
we will configure the server with ip address 184.108.40.206/24 with default gateway 220.127.116.11
Here the full configuration in /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
iface lo inet loopback
# The primary network interface
iface eth0 inet manual
iface eth1 inet manual
# bond0 is the bonded NIC and can be used like any other normal NIC.
# bond0 is configured using static network information.
iface bond0 inet static
# bond0 uses standard IEEE 802.3ad LACP bonding protocol
bond-slaves eth0 eth1
Step 4 – Apply network configution
To apply network configuration , you need to restart the server or restart networking service process using these command
sudo systemctl restart networking
See bond0 status and other info:
Example output :
You can test your connection using ping command
ping -c 5 www.google.com