The Linux kernel provides us with modules to perform network bonding. This tutorial discusses how to use the Linux bonding module to connect multiple network interfaces into a single interface.
Before we dive into the terminal and enable network bonding, let us discuss key concepts in network bonding.
There are six types of network bonding. They are:
Let us dive into the terminal and configure network bonding in ubuntu. Before we begin, ensure you have:
Ensure you have the bonding module installed and enabled in your kernel. Use the lsmod command as:
bonding 180224 1
If the module is unavailable, use the command below to install.
You can set up a temporary network bonding using two interfaces in your system. To do this, start by loading the bonding driver.
In the next step, let us get the names of the ethernet interfaces in our systems. Use the command:
The above command shows the interfaces in the system. You can find an example output in the image below:
Now, let us create a network bond using the ip command as:
sudo ifconfig ens36 down
sudo ip link add bond0 type bond mode 802.3ad
Finally, add the two interfaces:
sudo ip link set ens36 master bond0
To confirm the successful creation of the bond, use the command:
NOTE: Creating a bond, as shown above, will not survive a reboot.
We need to edit the interface configuration file and add the bonding settings to create a permanent bond.
In the file, add the following configuration.
iface ens33 inet manual
auto ens36
iface ens36 inet manual
auto bond0
iface bond inet static
address 192.168.0.253
netmask 255.255.255.0
gateway 192.168.0.1
dns-search domain-name.local
slaves ens33 ens36
bond_mode 4
bond-miimon 100
bond-downdelay 0
bond-updelay 0
NOTE: Ensure that the interfaces are bond=4 compliant. If not, you can use bond=0 instead. You may also need to take the two interfaces down and enable the bond.
Use the command below to activate the bond.
sudo service restart network-manager
To confirm the interface is up and running, use the command:
To view the status of the bond, use the command as:
Here is an example output:
This guide walked you through how to set up network bonding in Ubuntu and Debian-based distributions. To get detailed information about bonding, consider the documentation.
The latest interim release of Ubuntu introduces “devpacks” for popular frameworks like Spring, along with…
Ubuntu 25.04, codenamed “Plucky Puffin”, is here. This release continues Ubuntu’s proud tradition of integrating…
Ubuntu released its 20.04 (Focal Fossa) release 5 years ago, on March 23, 2020. As…
Focal Fossa will reach the End of Standard Support in May 2025, also known as…
Ubuntu MATE 25.04 is ready to soar! 🪽 Celebrating our 10th anniversary as an official…
Welcome to the Ubuntu Weekly Newsletter, Issue 887 for the week of April 6 –…