Huawei eNSP configures link aggregation (manual modification of priority) and (link aggregation load sharing method)

link aggregation

Scenario 1: Two lines are active links and one line is backup

image-20211026095345714

How to choose the active end? The default priority is 32768. The smaller the priority is than this default priority, the active end.

LSW1 is configured as the active end:
[LSW1]lacp priority 16384 #Set the LACP active end (the active end is used to determine the active interface)
LSW1 configuration:
int eth-trunk 1 #Create link aggregation port 1
mode lacp-static #Set the link aggregation mode to link aggregation control protocol
max active-linknumber 2 #Set the maximum active link to two
load-balance src-dst-mac #Modify the load sharing algorithm to the source and destination mac, and configure both the active client and the client.
trunkport GigabitEthernet 0/0/1#Add three lines to the link aggregation
trunkport GigabitEthernet 0/0/2
trunkport GigabitEthernet 0/0/3
port link-type trunk #Change the link aggregation mode to trunk
port trunk allow-pass vlan all #Let all vlan pass
LSW2 configuration:
int eth-trunk 1 #Create link aggregation port 1
mode lacp-static #Set the link aggregation mode to link aggregation control protocol
load-balance src-dst-mac #Modify the load sharing algorithm to the source and destination mac, and configure both the active client and the client.
trunkport GigabitEthernet 0/0/1#Add three lines to the link aggregation
trunkport GigabitEthernet 0/0/2
trunkport GigabitEthernet 0/0/3
port link-type trunk #Change the link aggregation mode to trunk
port trunk allow-pass vlan all #Let all vlan pass

Check the status and detailed explanation of eth-trunk 1

Why is the priority of LSW1 the first two activities and the latter one as backup? It means that they will first compare the priorities of these three interfaces. You can see that the priorities of these three interfaces are the same, and they will be added after comparison. The port ID is the name of the interface that is added. From small to large, the smaller number is the active end, and the larger number is the backup end.

Active end LSW1 effect:

image-20211026102441698

Backup side LSW2 effect:

image-20211026102903075

Manually modify priority

Must be modified on the active side

This is the default state. You can also make the Gi0/0/1 interface and Gi0/0/2 active, and the Gi0/0/3 interface in backup state.

LSW1 configuration:
int gi0/0/3 #Enter the gi0/0/3 interface
lacp priority 16384 #Modify the interface priority to 16384, the smaller the priority, the higher the priority.
quit #Exit interface configuration mode
int eth-trunk 1 #Enter link aggregation mode 1
lacp preempt enable #Enable preemption mode, because after modifying the priority, the effect is very slow. After enabling preemption, the desired interface can be reached faster
lacp preempt delay 10 #After preemption mode is turned on, it still takes 2 minutes to learn something. We change the 2 minutes to 10 seconds to let it learn quickly. Let's look at the status below.

As you can see here, after giving priority to Gi0/0/3, it becomes the active end, and then the active end continues the election. It can be found that the priorities are the same, but the smaller the ID of the active interface, the higher the priority. 2 ratio 3 small, 2 is the active end, 3 is the backup

image-20211026104520753

Link aggregation load sharing method

The load balancing method defaults to the source and destination IP addresses.

image-20211026105152713

Several modes of load sharing

[LSW2-Eth-Trunk1]load-balance ?
  dst-ip According to destination IP hash arithmetic #Modify to destination IP address
  dst-mac According to destination MAC hash arithmetic #Modify to the destination MAC address
  src-dst-ip According to source/destination IP hash arithmetic #Modify to source address and destination IP address
  src-dst-mac According to source/destination MAC hash arithmetic #Modify to source address and destination MAC address
  src-ip According to source IP hash arithmetic #Modify to source address
  src-mac According to source MAC hash arithmetic #Modify to source MAC address

Change it to the source and destination MAC

[LSW1-Eth-Trunk1]load-balance src-dst-mac #Modify the load sharing algorithm to the source directory mac, and configure both the active client and the client.

Guess you like

Origin blog.csdn.net/qq_54100121/article/details/133862501