Network interface bonding combines multiple network connections into a single logical interface. A bonded network interface can increase data throughput by load balancing or can provide redundancy by allowing failover from one NIC to another.
There are following bonding types:
Round-robin policy: Transmit packets in sequential order from the first available slave through the last. This mode provides load balancing and fault tolerance.
Active-backup policy: Only one slave in the bond is active. A different slave becomes active if the active slave fails.
XOR policy: Transmit based on the selected transmit hash policy.
Broadcast policy: transmits everything on all slave interfaces.
Creates aggregation groups that share the same speed and duplex settings. Utilizes all slaves in the active aggregator according to the 802.3ad specification.
Interface teaming is introduced in RHEL 7/CENTOS 7 it performs same function as NIC Bonding.
Teaming is a new feature; it handles the flows of packets more efficient than bonding does
Network teaming is implemented with a kernel driver and a user space daemon named teamd.
Software, called runners, enables load balancing
The following runners can be used:
broadcast : transmits each packet from all ports.
roundrobin : transmits each packets in a round-robin way from each of its ports.
activebackup: failover runner which watches for link changes and select an active port for data transfer.
loadbalance: monitor traffic and uses a hash function to try to reach a perfect balance when selecting ports for packet transmission.
lacp : Implement the 802.3ad Link Aggregation Control Protocol. It can use the same transmit port selection possibilities as the loadbalance runner.
Table of Comparison of Features in Bonding and Team
|broadcast Tx policy||Yes||Yes|
|round-robin Tx policy||Yes||Yes|
|active-backup Tx policy||Yes||Yes|
|LACP (802.3ad) support||Yes (passive only)||Yes|
|Hash-based Tx policy||Yes||Yes|
|User can set hash function||No||Yes|
|Tx load-balancing support (TLB)||Yes||Yes|
|LACP hash port select||Yes||Yes|
|load-balancing for LACP support||No||Yes|
|Ethtool link monitoring||Yes||Yes|
|ARP link monitoring||Yes||Yes|
|NS/NA (IPv6) link monitoring||No||Yes|
|ports up/down delays||Yes||Yes|
|port priorities and stickiness (“primary” option enhancement)||No||Yes|
|separate per-port link monitoring setup||No||Yes|
|multiple link monitoring setup||Limited||Yes|
|lockless Tx/Rx path||No (rwlock)||Yes (RCU)|
|user-space runtime control||Limited||Full|
|Logic in user-space||No||Yes|
|Performance overhead||Low||Very Low|
|multiple device stacking||Yes||Yes|
|zero config using LLDP||No||(in planning)|
We need install teamd package and to load team driver:
#yum –y install teamd , #modprobe team
In /etc/sysconfig/nework-scripts folder create file named team0
Balance type is set to activebackup, link_watch specifies how to monitor the link status. (Libteam lib uses ethtool to watch for link state changes). This is the default if no other link-watcher is specified.
Create files for ens224 and ens256 respectively:
You can set priority numbers to your own. Interfaces are part of team0 (interface_master)
If port priority is not specified by prio it defaults to 0; it accepts negative and positive values in the range -32,767 to +32,767.
Get team details and status:
#teamnl team0 ports , # teamdctl team0 state view -v
Script to configure teaming: