How to configure network interface teaming on Ubuntu?

by keegan.towne , in category: Networking & Wireless , a year ago

How to configure network interface teaming on Ubuntu?

Facebook Twitter LinkedIn Telegram Whatsapp

1 answer

by benny_schoen , a year ago

@keegan.towne 

Network interface teaming, also known as NIC teaming or bonding, allows you to combine multiple network interfaces into a single virtual interface, providing increased bandwidth, redundancy, and load balancing. Here are the steps to configure network interface teaming on Ubuntu:

  1. Install the bonding kernel module:
1
2
sudo apt-get update
sudo apt-get install ifenslave


  1. Configure the network interfaces in /etc/network/interfaces. For example, if you have two network interfaces named eth0 and eth1, you can configure them as follows:
1
2
3
4
5
auto bond0
iface bond0 inet dhcp
    bond-mode 4
    bond-miimon 100
    bond-slaves eth0 eth1


  • bond0 is the name of the virtual interface that will be created.
  • inet dhcp specifies that the interface will use DHCP to obtain its IP address.
  • bond-mode 4 specifies that the interface will use the 802.3ad LACP bonding mode.
  • bond-miimon 100 specifies that the interface will use a 100ms MII monitoring interval.
  • bond-slaves eth0 eth1 specifies that eth0 and eth1 are the physical interfaces that will be used for bonding.
  1. Restart networking:
1
sudo systemctl restart networking


  1. Verify that the bonding interface is up and running:
1
sudo ifconfig bond0


You should see output similar to the following:

1
2
3
4
5
6
7
bond0: flags=5187<UP,BROADCAST,RUNNING,MASTER,MULTICAST> mtu 1500
        inet6 fe80::a00:27ff:fe5b:e716  prefixlen 64  scopeid 0x20<link>
        ether 08:00:27:5b:e7:16  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0


That's it! You have now configured network interface teaming on Ubuntu.