Link aggregation principle and configuration

Link aggregation
Link aggregation: By bundling multiple Ethernet physical links together into a logical link, the purpose of increasing link bandwidth is achieved. At the same time, these bundled links can effectively improve the reliability of the links through mutual dynamic backup.

Reasons for link aggregation:

  • The continuous expansion of the network makes users increasingly demand higher bandwidth and reliability of backbone links. In the traditional technology, the method of replacing a high-speed interface board or a device supporting a high-speed interface board is often used to increase the bandwidth, but this scheme requires a high cost and is not flexible enough.

  • Using link aggregation technology can achieve the purpose of increasing link bandwidth without bundling hardware upgrades by bundling multiple physical interfaces into one logical interface without hardware upgrades. While achieving the purpose of increasing bandwidth, link aggregation uses a backup link mechanism, which can effectively improve the reliability of links between devices. (The backup mechanism is only supported by link aggregation in LACP mode), and when it is bundled as a logical port, it only needs to be configured on the logical port. In fact, the links in the logical port will be set in batches, which will not be wasted IP address resources.

Advantages of link aggregation:
① Upgrade bandwidth is low, and logical bundling is used instead of physical upgrade.
② Redundancy design, there will be no break due to single point of failure.
③ Load sharing (stream-by-packet)

Eth-Trunk concept

  • Eth-Trunk is a bundling technology that bundles multiple Ethernet interfaces into one logical interface.
    Eth-Trunk link aggregation mode:
    ①Manual load sharing mode
    (manual load sharing mode is used when the device does not support LACP mode. In manual load sharing mode, it is in the state of 1: 1: 1, each link is carried out Data forwarding)
    ② LACP mode.
    (LACP mode is also known as M: N mode, where M links are active to forward data, and N links are inactive as backup links. In LACP mode, link backup can be achieved. Refer to the maximum bandwidth In fact, it is the sum of all the interface bandwidth in the trunk port)

  • Eth-Trunk can be used for Layer 2 link aggregation or Layer 3 link aggregation. By default, Ethernet interfaces work in Layer 2 mode. If you need to configure a Layer 2 Eth-Trunk interface, you can use the portswitch command to switch the interface to a Layer 2 interface; if you need to configure a Layer 3 Eth-Trunk interface, you can use the undo portswitch command to switch the interface to a Layer 3 interface.

Selection of active link in LACP mode

  • General process:
    ① First, select the master device between the devices as the active end. The role of the active end is actually used to determine which links are used as active links and which links are used as backup link devices. Of course, when a link fails, which device gives priority to convert the standby link on its own device to an active link, that is, the active end is used as a measurement standard.
    ② After selecting the active end, the active end judges the active link and the standby link according to the parameters, that is, the priority of the interface.
    ③ The link selection at the passive end is actually based on the active end.

Insert picture description here

  • In the scenario described in the figure above, the number of links between the devices is actually 3, and the maximum number of active links is set to 2, that is, 2 links are in the forwarding state and 1 link is in the backup state.

  • Prerequisite overview:
    ① Select the end with the higher system LACP priority as the active end among the devices at both ends, and select the end with the lower MAC address as the active end if the system LACP priorities are the same.
    The smaller the system LACP priority value, the higher the priority. By default, the system LACP priority value is 32768.
    ② The lower the LACP priority of the interface, the higher the priority. If the LACP priorities of the interfaces are the same, the interface with the smallest interface ID (interface number) is preferentially selected as the active interface.
    The LACP priority of an interface is to distinguish the priority of different interfaces in the same Eth-Trunk being selected as active interfaces. The interface with a higher priority will be selected as the active interface first.

  • The preemption mechanism in LACP mode:
    ① Huawei devices disable the preemption mechanism by default. If preemption needs to be enabled, you can run the lacp preempt enable command to enable the priority preemption function.
    ② Preemption delay: When
    LACP preemption occurs, the link in the standby state will wait for a period of time before switching to the forwarding state. This is the preemption delay. The preemption delay is configured to avoid the instability of Eth-Trunk data transmission due to frequent changes of certain link states.

Eth-Trunk interface load sharing
① When Eth-Trunk interface performs load sharing, you can select the IP address or packet as the hash basis of load sharing; at the same time, you can also set the load sharing weight of the member interface.
②In the Eth-Trunk interface, the greater the proportion of the weight value of a member interface to the sum of the load sharing weights of all member interfaces, the greater the load the member interface bears.

  • Differences in sharing methods:
    Insert picture description here
**华为设备负载分担指令**
①配置负载分担方式 
执行命令system-view,进入系统视图。 
执行命令interface eth-trunk trunk-id,进入Eth-Trunk接口视图。 
执行命令load-balance { ip | packet-all },配置Eth-Trunk接口的散列依据。
缺省情况下,当Eth-Trunk接口根据IP进行散列。
说明:
①基于IP的散列算法能保证包顺序,但不能保证带宽利用率。 
②基于包的散列算法能保证带宽利用率,但不能保证包的顺序。
配置负载分担权重 
执行命令system-view,进入系统视图。 
执行命令interface interface-type interface-number,进入以太网接口视图。 
执行命令distribute-weight weight-value,配置Eth-Trunk成员接口的负载分担权重。
缺省情况下,成员接口的负载分担权重为1。
Published 28 original articles · won 15 · views 872

Guess you like

Origin blog.csdn.net/weixin_45948002/article/details/105030998