How to set up LACP bonding on Ubuntu 16.04

Estimated reading time: 1 min


This guide will help you set up the LACP bonding using the IEEE 802.3ad specification. LACP which stands for “Link Aggregation Control Protocol”, is used to combine several physical network connections with the aim of the increasing the speed and reliability of a network. By the end of this tutorial, you will have a bonded network of two network interfaces.


  • The network switch your server is connected to must be set up accordingly in for a successful procedure

Step 1 – Login using SSH

You need to log in as root or a user with root privileges. You can check this article for instructions on how to log in using SSH.

Step 2 – Install the ifenslave dependency

sudo apt-get install ifenslave

Step 3 – Ensure presence of the “bonding” module

sudo modprobe bonding

Step 4 – Load bonding  modules during boot

sudo nano /etc/modules

Append the following lines:


Step 5 – find the active network interface

clear && echo $(ip -o -4 route get | sed -nr 's/.*dev ([^\ ]+).*/\1/p')

Step 6 – Configure the network interface

The output of step 4 is the network interface which is active at the moment. You should use that name for the bond. In our case this is enp2s0 and the second interface enp3s0

sudo nano /etc/network/interfaces

auto enp6s0
iface enp6s0 inet manual
bond-master bond0

auto enp7s0
iface enp7s0 inet manual
bond-master bond0

auto bond0
iface bond0 inet static
        address 89.207.134.XXX
        slaves enp6s0 enp7s0
        bond-mode 4
        bond-miimon 100
        bond-lacp-rate 1
        bond-slaves none

Step 7 – Restart the server

Now that editing is done, double check that all the steps have been executed properly and reboot your machine by running the reboot command:


Step 8 – Check bonding interface status

If everything went well, you should have a working bonding interface. You can check this by executing the following command:

cat /proc/net/bonding/bond0


Congratulations, you have configured LACP network interface according to IEEE 802.3ad on a Ubuntu server. If you are interested in other modes which are available check this url section “Descriptions of bonding modes”.

Was this article helpful?
Dislike 1
Views: 15497

Reader Interactions


    • Ahmet Bas says

      If Ubuntu 19.04 is not using Netplan it should be quite the same. If it's using netplan you can try to use this article

    • Ahmet Bas says

      The first and second interface get configured as followed:
      auto enp6s0
      iface enp6s0 inet manual
      bond-master bond0
      auto enp7s0
      iface enp7s0 inet manual
      bond-master bond0

      Since we are making a bond we do not have to assign an IP address to a nic but to a bond. Does this answer your question?

Leave a Reply

Your email address will not be published. Required fields are marked *