1. 程式人生 > 其它 >huawei--配置鏈路聚合

huawei--配置鏈路聚合

huawei--配置鏈路聚合

專案要求:

	LSW1和LSW2之間配置鏈路聚合,鏈路聚合分為手工和lacp兩種模式。配置完後檢視鏈路聚合狀態。

專案實施:

(vlan10 20 30的建立命令vlan batch 10 20 30)

1、建立鏈路聚合組

LSW1

[SW1]interface Eth-Trunk 1

LSW2

[SW2]interface Eth-Trunk 1

2、埠加入鏈路聚合組

LSW1

[SW2-Eth-Trunk1]trunkport GigabitEthernet 0/0/3 to 0/0/5

LSW2

[SW2-Eth-Trunk1]trunkport GigabitEthernet 0/0/3 to 0/0/5

3、配置鏈路聚合組的傳輸模式為trunk

LSW1

[SW1-Eth-Trunk1]port link-type trunk

[SW1-Eth-Trunk1]port trunk allow-pass vlan 10 20 30

LSW2

[SW2-Eth-Trunk1]port link-type trunk

[SW2-Eth-Trunk1]port trunk allow-pass vlan 10 20 30

4、配置完後檢視鏈路聚合狀態

LSW1

LSW2

5、因為手工聚合沒有冗餘,修改成靜態聚合。(修改前把trunk模式和介面去掉)

LSW1

[SW1]interface Eth-Trunk 1

[SW1-Eth-Trunk1]undo port tr al vlan 10 20 30

[SW1-Eth-Trunk1]undo port link-type

[SW1-Eth-Trunk1]undo trunkport GigabitEthernet 0/0/3 to 0/0/5

[SW1-Eth-Trunk1]mode lacp-static

LSW2

[SW2]interface Eth-Trunk 1

[SW2-Eth-Trunk1]undo port tr al vlan 10 20 30

[SW2-Eth-Trunk1]undo port link-type

[SW2-Eth-Trunk1]undo trunkport GigabitEthernet 0/0/3 to 0/0/5

[SW2-Eth-Trunk1]mode lacp-static

6、介面重新加入鏈路聚合組,並配置鏈路聚合組的傳輸模式為trunk

LSW1

[SW2-Eth-Trunk1]trunkport GigabitEthernet 0/0/3 to 0/0/5

[SW1-Eth-Trunk1]port link-type trunk

[SW1-Eth-Trunk1]port trunk allow-pass vlan 10 20 30

LSW2

[SW2-Eth-Trunk1]trunkport GigabitEthernet 0/0/3 to 0/0/5

[SW2-Eth-Trunk1]port link-type trunk

[SW2-Eth-Trunk1]port trunk allow-pass vlan 10 20 30

7、啟用鏈路,並開啟搶佔模式

LSW1

[SW1-Eth-Trunk1]max active-linknumber 2

[SW1-Eth-Trunk1]lacp preempt enable

LSW2

[SW2-Eth-Trunk1]max active-linknumber 2
[SW2-Eth-Trunk1]lacp preempt enable

8、配置搶佔時間(單位:秒),設定優先順序使LSW1變成主裝置(優先順序預設是:32768,值越小優先順序越高。)

LSW1

[SW1-Eth-Trunk1]lacp preempt delay 10

[SW1]lacp priority 32760 (優先順序)

LSW2

[SW1-Eth-Trunk1]lacp preempt delay 10

9、配置完後檢視鏈路聚合狀態

LSW1

LSW2