Network card bonding is an effective way to increase the available bandwidth, if it is done carefully. Without a switch that supports 802.3ad, you must have the right hardware to make it work. In this article we will explain how bonding works so you can deploy the right mode for your situation. Most administrators assume […]
Network card bonding is an effective way to increase the available bandwidth, if it is done carefully. Without a switch that supports 802.3ad, you must have the right hardware to make it work. In this article we will explain how bonding works so you can deploy the right mode for your situation.
Most administrators assume that bonding multiple network cards together instantly results in double the bandwidth and high-availability in case a link goes down. Unfortunately, this is not true. Let’s start with the most common example, where you have a server with high network load, and wish to allow more than 1Gb/s.
You connect two interfaces to your switch, enable bonding, and discover half your packets are getting lost. If Linux is configured for 802.3ad link aggregation, the switch must also be told about this. In the Cisco world, this is called an EtherChannel. Once the switch knows those two ports are actually supposed to use 802.3ad, it will load balance the traffic destined for your attached server.
This works great if a large number of network connections from a diverse set of clients are connecting. If, however, the majority of the throughput is coming from a single server, you won’t get better than the 1Gb/s port speed. Switches are load balancing based on the source MAC address by default, so if only one connection takes place, it always gets sent down the same link. Many switches support changing of the load balancing algorithm, so if you fall into the single server-to-server category, make sure you allow it to round-robin the Ethernet frames.
Alternatively, you don’t need to burn the expensive switch ports at all. Both servers can be connected together via crossover cables to the bonded interfaces. In this configuration, you want to use balance-rr mode on both sides, which we will explain momentarily.
There are multiple modes you can set in Linux, and the most common “generic” one is bonding-alb. This mode works effectively in most situations, without needing to configure a switch or trick anything else. It does, however, require that your network interface support changing the MAC address on the fly. This mode works well “generically” because it is constantly swapping MAC addresses to trick the other end (be it a switch or another connected host) into sending traffic across both links. This can wreak havoc on a Cisco network with port security enabled, but in general it’s a quick and dirty way to get it working.
Channel Bonding modes can be broken into three categories: generic, those that require switch support, and failover-only.
The failover-only mode is active-backup: One port is active until the link fails, then the other takes over the MAC and becomes active.
Modes that require switch support are:
Note that modes requiring switch support can be run back-to-back with crossover cables between two server as well. This is especially useful, for example, when using DRBD to replicate two partitions.
Generic modes include:
How often have you seen a network die catastrophically? So bad that the link died? Chances are: never. More often you will see packet loss and very strange behavior. The failover part of NIC bonding is quite attractive to many administrators, but it rarely ever works. When the switch that both ports is connected to reboots for a firmware upgrade, you are down.
The easy fix is to connect each port to two distinct switches, right? If you are using a bonding mode that doesn’t require switch support this will work fine. If, however, you are using a mode that requires switch support, this is not possible on most devices. Switches that support stacking, and are managed from a single point, often support EtherChannel across multiple switches. Ideally, you would would connect one port to each, and never reboot the whole stack of switches simultaneously.
Bonding is simple once you understand the limitations of each mode. if you’re working in an environment where switches support 802.3ad and you have no special needs, use that mode. Conversely, if you have no switch support and just want to increase throughput and enable failover, use balance-alb. Finally, if you just need a data replication link between two servers, balance-rr is the way to go.
Enterprise Networking Planet aims to educate and assist IT administrators in building strong network infrastructures for their enterprise companies. Enterprise Networking Planet contributors write about relevant and useful topics on the cutting edge of enterprise networking based on years of personal experience in the field.
Property of TechnologyAdvice. © 2025 TechnologyAdvice. All Rights Reserved
Advertiser Disclosure: Some of the products that appear on this site are from companies from which TechnologyAdvice receives compensation. This compensation may impact how and where products appear on this site including, for example, the order in which they appear. TechnologyAdvice does not include all companies or all types of products available in the marketplace.