Ubuntu 16.04 Bonding Configuration (Without LACP AND LACP)

What is Bonding?

It is the process of joining multiple ethernet interfaces. Network teaming can also be called. In other words, if more than one network card acts as a single network card, if one of the cards is disconnected, it is the process of continuous connection over the other card.

What is LACP?

Ether Channel is performed with two protocols. The first is the cisco protocol PAgP (Port Aggregation Protocol) and the second is the LACP (Link Aggregation Control Protocol) standard protocol with IEEE 802.3ad. Ether Channel is a protocol that allows the switch to detect two or more cables as a single cable when two or more cables are connected between two switches. Ether Channel provides both redundancy, loadbalance, and high bandwidth.

Bonding MODs

mode = 0 >> Round-robin (balance-rr) sends packets to the interfaces, respectively.

mode = 1 >> Active-backup works. Only one interface is active.

mode = 2 >> [(Source MAC address XOR destination MAC address)% interfaces] Sends packets according to the balance-xor algorithm.

mode = 3 >> Broadcast type. It sends all packets from all interfaces.

mode = 4 >> IEEE 802.3ad Dynamic link aggregation (802.3ad), LACP. Active-active works.

mode = 5 >> The total load is shared according to the load of each interface (balance-tlb).

mode = 6 >> Adaptive load balancing mode (balance-alb).

Our example scenario is as follows,

NIC-Bonding Example
NIC-Bonding Example

1- Bonding with LACP configuration,

Now configure the inside of the file “/etc/network/interfaces”  as follows. You can edit by your own nic card names.

Then you can restart the network service with the command  “systemctl restart networking.service”, you will only need to reboot the OS because Ubuntu network service has not reached the desired level yet. So restart the system directly with the reboot command.

Then you can check the operations with “ip a” command.

You can also get details of Bonding configurations with the command below.

NOTE1: In the bonding configuration, bond0 inherits and uses the physical address of the nic that appears as the first slave. This means that the MAC Address status will be as in the example below (you can also confirm it from the screenshot). This applies except for mod5 and mod6. In addition, mod1 also uses the unique MAC Address because of its active-backup operation principle.

NOTE2: If you configure Bondings on the OS side as LACP, you must configure the LACP on the corresponding ports on the Switch side. As an example, I share the setting that needs to be done on the Switch side below.

2- Normal Bonding configuration without LACP,

3- Rope without nic bonding configuration,

I hope it has been a useful article.