mudlet On Ubuntu 16.04
Ubuntu 18.04 bonding


In this article, we’ll look at how to set up LACP bonding on a server running Ubuntu. LACP bonding uses the Link Aggregation Control Protocol to combine two network interfaces into one logical interface. Today, we’ll use it to combine two ethernet interfaces. This is useful to increase the throughput from each ethernet device and to provide for a way to failover if there’s an error with one of the devices.


  • The network switch your server is connected to must be set up accordingly in for a successful procedure
  • You need to have the SSH login details of your server ready

Step 1 – Login using SSH

You must be logged in via SSH as sudo or root user.

Step 2 – Install the ifenslave dependency

  • sudo apt-get install ifenslave

Step 3: Load bonding kernel module

Before you can configure the network cards you need to ensure that the kernel module called bonding is present and loaded.

  • sudo lsmod | grep bonding

If the module is not loaded. Use the following command to load it

  • sudo modprobe bonding

To ensure that the bonding module is loaded during boot time change file the following file

  • sudo nano /etc/modules

Add the following line

  • bonding

Step 4 – find the active network interface

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

Recommended Reading: How to Install ownCloud on Ubuntu 18.04

Step 5 – 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.

  • # This file is generated from information provided by
  • # the datasource. Changes to it will not persist across an instance.
  • # To disable cloud-init’s network configuration capabilities, write a file
  • # /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg with the following:
  • # network: {config: disabled}
  • network:
  • version: 2
  • ethernets:
  • eports:
  • match:
  • name: enp*
  • optional: true
  • bonds:
  • bond0:
  • interfaces: [eports]
  • addresses: []
  • gateway4:
  • nameservers:
  • addresses: [,]
  • parameters:
  • mode: 802.3ad
  • lacp-rate: fast
  • mii-monitor-interval: 100

Apply the changes

  • sudo netplan apply

Step 6 – Reboot

  • reboot

Step 7 – 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 18.04 with Netplan.



Please enter your comment!
Please enter your name here