FAQ-Reference Information

Publication Date:  2015-06-16 Views:  376 Downloads:  0
Issue Description
Reference Information.
Solution
Working Modes of Bonded Network Ports on the Linux OS

The bonding driver provides seven load balancing modes: balance-rr, active-backup, balance-xor, broadcast, 802.3ad, balance-tlb, and balance-alb. balance-xor and balance-alb are often used.
  • balance-rr or 0: indicates the polling mode that supports load balancing and fault tolerance (FT). In this mode, two network ports work simultaneously.
  • active-backup or 1: indicates the active/standby switchover mode that supports redundancy. In this mode, only one network port works at a time, and the other stands by. Network ports in this mode can work with any layer 2 switch.
  • balance-xor or 2: indicates the hash-based load balancing mode. In this mode, traffic is distributed by using the hash algorithm that is determined by the Transmission Control Protocol (TCP) layer set in xmit_hash_policy. Access requests from different sources are processed in the same network interface card (NIC).
  • broadcast or 3: indicates the broadcast mode. In this mode, all bonded NICs receive the same data. This mode is used to meet special network requirements.
  • 802.3ad or 4: indicates the 802.3ad mode. Switches should support Institute of Electrical and Electronics Engineers (IEEE) 802.3ad. Theoretically, when both servers and switches support this mode, the network bandwidth can be doubled (for example, from 1 Gbit/s to 2 Gbit/s). In this mode, the bonding device can work with systems that support the IEEE 802.3ad Dynamic Link Aggregation (DLA). Most manageable switches and many unmanageable switches support the IEEE 802.3ad standard.
  • balance-tlb or 5: indicates the transmit load balancing (TLB) mode. In this mode, data is transmitted by all bonded NICs, and only one NIC receives data. If the NIC that is used to receive data fails, another NIC takes over the job. This mode requires that the speed information about all NICs and drivers be obtained by using the ethtool command.
  • balance-alb or 6: indicates the receive and transmit load balancing mode (RLB and TLB). Compared with mode 5, this mode also supports load balancing for data receiving. This mode requires that the speed information about all NICs and drivers be obtained through the ethtool command and NIC Media Access Control (MAC) addresses be dynamically changed.

xmit_hash_policy (settings of this parameter affect modes 2 and 4 and the default value is layer2):
  • layer2: indicates that the hash algorithm is generated by performing exclusive OR (XOR) on MAC addresses.
This algorithm distributes all traffic of a network peer to the same slave NIC.
  • layer3+4: indicates that the hash algorithm is generated based on TCP and User Datagram Protocol (UDP) ports and their IP addresses.
Modes 0, 2, 3, and 4 require that switches support port groups. For example, connected ports on Cisco switches must be set to trunk group.

In basic load balancing modes (balance-rr and balance-xor), the bonding device can operate in any system that supports EtherChannel (also called trunking). Most manageable switches and many unmanageable switches support EtherChannel.

The advanced load balancing modes (balance-tlb and balance-alb) have no special requirements on switches but require that NIC drivers support certain functions (for details, see descriptions about balance-tlb and balance-alb).

Working Modes of Bonded Network Ports on the Windows OS

The Intel 82571 NIC driver provides five advanced networking services (ANS) team types: adapter fault tolerance (AFT), adaptive load balancing (ALB), static link aggregation (SLA), IEEE 802.3ad DLA, and switch FT (SFT). The following describes each ANS team.

NOTICE:
You are advised to use the AFT mode to improve network stability.

AFT

When a switch port, a cable, or an adapter fails, AFT allows the standby adapter to take over the job of the active adapter.

An adapter is specified as the active adapter, and remaining adapters are standby adapters.

You can specify the primary and secondary adapters for the team, which is not mandatory.
  • The primary adapter serves as the active adapter.
  • The secondary adapter serves as the standby adapter. If the active adapter fails, the secondary adapter takes over its job, and other adapters still stand by.
  • Adapters except for the primary and secondary adapters stand by until the primary and secondary adapters fail.
  • If the primary adapter is not specified, the fastest adapter in the team is used.
  • If the primary adapter is changed or a primary adapter is added, the team is reloaded, resulting in connection loss in a short time.
Configuration description
  • AFT supports two to eight adapter ports in a team.
  • Team members do not need to operate at the same speed or in the duplex mode.
  • This team mode does not require configuration of switches.
  • This team mode applies to any switch or hub.
ALB

ALB provides transmit load balancing and FT when a switch port, a cable, or an adapter fails.

The Intel (R) PROSet is used to analyze transmit loads of member adapters and balance traffic among member adapters. An adapter is used to receives all traffic.

ALB provides the RLB option. RLB allows receive traffic to be balanced among member adapters. RLB is enabled by default.

You can specify the primary and secondary adapters for the team, which is not mandatory when RLB is disabled. If RLB is enabled, the primary adapter is automatically specified.
  • RLB requires a primary adapter. You can specify a new adapter as the primary adapter, but you cannot delete the primary adapter from the team.
  • You do not need to specify the primary adapter when RLB is disabled.
  • When RLB is disabled, traffic is received by the primary adapter only.
  • When RLB is enabled, the fastest adapter is automatically specified as the primary adapter.
  • If the primary adapter is changed or a primary adapter is added, the team is reloaded, resulting in connection loss in a short time.
SLA

SLA is a performance optimization technology, which aims at increasing throughput between switches and between switches and servers. To achieve the purpose, a boundary or channel is statically configured to aggregate multiple ports to form a single link. In this way, the total link bandwidth is increased, and FT is provided when a switch port, a cable, or an adapter fails.

You can specify the primary and secondary adapters for the team, which is not mandatory.
  • If the primary adapter is specified, the team uses the MAC address of the adapter to transmit data.
  • If the primary adapter is changed or a primary adapter is added, the team is reloaded, resulting in connection loss in a short time.
IEEE 802.3ad DLA

IEEE 802.3ad is a standard that is used to increase throughput between switches and between switches and servers. To achieve the purpose, a boundary or channel is dynamically configured to aggregate multiple ports to form a single link that uses the Link Aggregation Control Protocol (LACP). In this way, the total link bandwidth is increased, and FT is provided when a switch port, a cable, or an adapter fails.

You can specify the primary and secondary adapters for the team, which is not mandatory.
  • If the primary adapter is specified, the team uses the MAC address of the adapter to transmit data.
  • If the primary adapter is changed or a primary adapter is added, the team is reloaded, resulting in connection loss in a short time.
SFT

SFT supports redundancy across switches. When a switch port, a cable, or an adapter fails, the standby adapter connected to another switch takes over the job.

The PROSet specifies an adapter as the active adapter and remaining adapters as standby adapters. You can specify the primary and secondary adapters for the team, which is not mandatory.
  • The primary adapter serves as the active adapter.
  • The secondary adapter serves as the standby adapter. If the active adapter fails, the secondary adapter takes over its job.
  • If the primary adapter is not specified, the fastest adapter in the team is used.
  • If the primary adapter is changed or a primary adapter is added, the team is reloaded, resulting in connection loss in a short time.
Configuring Multiple Bonding Devices

Configuring multiple bonding devices on the SUSE OS

On the SUSE operating system (OS), the sysconfig network initialization system can process multiple bonding devices. You only need to configure a correct ifcfg-bondX configuration file for each bonding instance. Do not set max_bonds for any bonding instance; otherwise, configuration errors occur. If you want to set different parameters for different bonding devices, you can create multiple ifcfg-bondX files.

Because the sysconfig script provides bonding options in the ifcfg-bondX file, you do not need to add the options to /etc/modules.conf.

Configuring multiple bonding devices on the RedHat OS

On the RedHat OS, the initscripts package does not support bonding driver loading for multiple times. Therefore, you need to manually configure multiple bonding devices on the RedHat OS.

To create bonding devices with different options, you need to load the bonding driver for multiple times. The sysconfig network initialization script can automatically load the bonding driver for multiple times.

To load multiple bonding instances, you need to name each instance uniquely (the loading system requires a unique name for each instance even if the instances belong to the same module). You can name instances by specifying bonding options in /etc/modprobe.conf. Example:

alias bond0 bonding
options bond0 -o bond0 mode=balance-rr miimon=100
alias bond1 bonding
options bond1 -o bond1 mode=balance-alb miimon=50


The OS will load the bonding module twice. The first instance is named bond0, which is created in the balance-rr mode. miimon is set to 100. The second instance is named bond1, which is created in the balance-alb mode. miimon is set to 50.

In some cases (when an early-version software package is used), settings of the preceding parameters cannot take effect, and the options of the second instance are not used. In this case, replace the options of the second instance as follows:

install bond1 /sbin/modprobe --ignore-install bonding -o bond1 \
    mode=balance-alb miimon=50


These options can be repeatedly used for specifying multiple bonding instances. To configure other bonding instances, you only need to replace bond1 with other names.

NOTICE:
The kernels of some RedHat OSs cannot rename modules (by modifying -o bond1) during loading and perform operations on modprobe. Then an error indicating "Operation not permitted" is generated for the modprobe option. This issue occurs in some Fedora Core kernels and in the RHEL 4 OS. When this issue occurs, you cannot configure multiple bonding devices by configuring different parameters.

For more information, see Documentation/networking/bonding.txt in the latest kernel source code.

END