[Description of seven bond modes of linux]

The first mode: mod=0 , namely: (balance-rr) Round-robin policy

Features: The sequence of transmitting data packets is sequentially transmitted (ie: the first packet goes to eth0, the next packet goes to eth1.... It continues to cycle until the last transmission is completed). This mode provides load balancing and fault tolerance; but we know that If the data packets of a connection or session are sent from different interfaces, and then go through different links in the middle, the problem of out-of-order arrival of data packets is likely to occur on the client side, and the out-of-order data packets need to be re-requested. send, so the throughput of the network will drop

 

The second mode: mod=1, that is: (active-backup) Active-backup policy

Features: Only one device is active, when one is down, the other is immediately converted to the main device by the backup. The mac address is visible from the outside. From the outside, the MAC address of the bond is unique to avoid confusion in the switch. This mode only provides fault tolerance; it can be seen that the advantage of this algorithm is that it can provide high network connection availability, but its resource utilization is low, only one interface is in working state, and in the case of N network interfaces, Resource utilization is 1/N

 

The third mode: mod=2 , that is: (balance-xor) XOR policy (balance policy)

Features: Data packets are transmitted based on the specified transmission HASH strategy. The default strategy is: (source MAC address XOR destination MAC address) % slave count. Other transport policies can be specified via the xmit_hash_policy option, this mode provides load balancing and fault tolerance

 

The fourth mode: mod=3 , namely: broadcast (broadcast strategy)

Features: Each packet is transmitted on each slave interface, this mode provides fault tolerance

 

The fifth mode: mod=4 , ie: (802.3ad) IEEE 802.3adDynamic link aggregation

Features: Create an aggregate group that shares the same speed and duplex settings. According to the 802.3ad specification, multiple slaves work under the same active aggregate.

Slave election for outgoing traffic is based on the transport hash policy, which can be changed from the default XOR policy to other policies via the xmit_hash_policy option. It should be noted that not all transmission strategies are 802.3ad compliant, especially considering the packet out-of-order problem mentioned in Section 43.2.4 of the 802.3ad standard. Different implementations may have different adaptations.

Requirements:

Condition 1: ethtool supports getting the speed and duplex settings of each slave

Condition 2: switch (switch) supports IEEE 802.3ad Dynamic link aggregation

Condition 3: Most switches (switches) need to be specifically configured to support 802.3ad mode

 

The sixth mode: mod=5 , namely: (balance-tlb) Adaptive transmit load balancing (adapter transmit load balancing)

Features: Channel bonding that does not require any special switch (switch) support. Outgoing traffic is distributed on each slave based on the current load (calculated based on speed). If the slave receiving data fails, another slave takes over the MAC address of the failed slave.

Necessary conditions for this mode: ethtool supports getting the rate of each slave

 

The seventh mode: mod=6 , that is: (balance-alb) Adaptive load balancing (adapter adaptive load balancing)

Features: This mode includes the balance-tlb mode, plus receive load balance (rlb) for IPV4 traffic, and does not require any switch (switch) support. Receive load balancing is achieved through ARP negotiation. The bonding driver intercepts the ARP reply sent by the local machine, and rewrites the source hardware address to the unique hardware address of a slave in the bond, so that different peers use different hardware addresses to communicate.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326285762&siteId=291194637