How to configure network bonding on Ubuntu?

Member

by tina , in category: Networking & Wireless , a year ago

How to configure network bonding on Ubuntu?

Facebook Twitter LinkedIn Telegram Whatsapp

1 answer

by raphaelle , 10 months ago

@tina 

Network bonding, also known as NIC teaming, is a technique that provides network redundancy and link aggregation by combining multiple network interfaces into a single virtual interface. In Ubuntu, network bonding can be easily configured using the following steps:

  1. Check for network bonding support: Before configuring network bonding, make sure that your network adapter supports bonding by verifying if the bonding kernel module is loaded or not. You can do this by running the following command: $ lsmod | grep bonding If the output shows "bonding" then bonding is supported in your kernel.
  2. Install the bonding interface: If bonding is not installed, run the following command to install it: $ sudo apt-get install ifenslave
  3. Configure network bonding: Edit the /etc/network/interfaces file and add the following lines to create a new bond interface:


auto bond0 iface bond0 inet static address 192.168.1.100 netmask 255.255.255.0 gateway 192.168.1.1 bond-mode 802.3ad bond-miimon 100 bond-lacp-rate 1 bond-slaves enp1s0f0 enp1s0f1


Note: Replace the IP address, netmask, gateway, bond-mode, bond-miimon, bond-lacp-rate and bond-slaves parameters with your desired configuration.

  1. Restart networking services: Restart the networking services to apply the changes: $ sudo systemctl restart networking


Alternatively, you can restart the network interface by running:


$ sudo ifdown && sudo ifup


That's it. Now you have a bonded interface which provides redundancy and link aggregation to your network.