网卡绑定有七种模式:
1. mode=0 round-robin
2. mode=1 active-backup
3. mode=2 load balancing (xor)
4. mode=3 fault-tolerance (broadcast)
5. mode=4 lacp
6. mode=5 transmit load balancing
7. mode=6 adaptive load balancing
(1)轮询策略(Round-robin policy),模式代号是0。该策略是按照设备顺序依次传输数据包,直到最后一个设备。这种模式提供负载均衡和容错能力。
(2)活动备份策略(Active-backup policy),模式代号是1。该策略只有一个设备处理数据,当它宕机的时候就会由备份代替,仅提供容错能力。
(3)异或策略(XOR policy),模式代号是2。该策略是根据MAC地址异或运算的结果来选择传输设备,提供负载均衡和容错能力。
(4)广播策略(Broadcast policy),模式代号是3。该策略通过全部设备来传输所有数据,提供容错能力。
(5)IEEE 802.3ad 动态链接聚合(IEEE 802.3ad Dynamic link aggregation),模式代号是4。该策略通过创建聚合组来共享相同的传输速度,需要交换机也支持 802.3ad 模式,提供容错能力。
(6)适配器传输负载均衡(Adaptive transmit load balancing),模式代号是5。该策略是根据当前的负载把发出的数据分给每一个设备,由当前使用的设备处理收到的数据。本策略的通道联合不需要专用的交换机支持,提供负载均衡和容错能力。
(7)适配器负载均衡(Adaptive load balancing),模式代号是6。该策略在IPV4情况下包含适配器传输负载均衡策略,由ARP协商完成接收的负载,通道联合驱动程序截获ARP在本地系统发送出的请求,用其中一个设备的硬件地址覆盖从属设备的原地址。
Bonding modes:
balance-rr
Transmissions are received and sent out sequentially on each bonded slave interface. This mode provides fault tolerance and load balancing.
active-backup
Only one slave in the bond is active. Another bonded slave interface is only used if the active bonded slave interface fails. This mode provides fault tolerance.
balance-xor
Transmission is based on the following equation: [(the source MAC address XOR'd with the destination MAC address) modulo (slave count)]. This selects the same slave for each destination MAC address. This mode provides fault tolerance and load balancing.
broadcast
Transmits everything on all slave interfaces. This mode provides fault tolerance.
802.3ad
IEEE 802.3ad Dynamic link aggregation. Creates aggregation groups that share the same speed and duplex settings. Utilizes all slaves in the active aggregator according to the 802.3ad specification. Requires a switch that supports IEEE 802.3ad Dynamic link aggregation.
balance-tlb
Channel bonding that does not require any special switch support. The outgoing traffic is distributed according to the current load (computed relative to speed) on each slave. Incoming traffic is received by the current slave. If the receiving slave fails, another slave takes over the MAC address of the failed receiving slave. This mode provides fault tolerance and load balancing.