「Huawei VRP」- 配置链路聚合,Eth-Trunk

  CREATED BY JENKINSBOT

LACP Mode

SW1:

[SW1] interface eth-trunk 1                                                     # 创建链路聚合组
[SW1-Eth-Trunk1] mode lacp                                                      # 设置模式
[SW1-Eth-Trunk1] max active-linknumber 2
[SW1-Eth-Trunk1] trunkport gigabitethernet 0/0/1 to 0/0/3                       # 添加接口

[SW1] lacp priority 30000

// ---------------------------------------------------------------------------- # 配置其他(可选)

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

SW2:进行类似配置

补充说明:
1)在华为交换机中,接口可能出于 shutdown 状态导致 LCAP 无法建立;

基础命令

配置链路聚合模式:

[Huawei-Eth-Trunk1] mode {lacp | manual load-balance}

# Mode:
# lacp 配置链路聚合模式为 lacp 模式
# manual load-balance 配置链路聚合模式为手工模式。
# 注意:需要保持两端链路聚合模式一致。

将接口加入链路聚合组中:

# 在接口视图下,把接口加入到Eth-Trunk中。
[Huawei-GigabitEthernet0/0/1] eth-trunk trunk-id

# 将接口加入链路聚合组中(Eth-Trunk视图)
[Huawei-Eth-Trunk1] trunkport interface-type { interface-number}

允许不同速率端口加入同一Eth-Trunk接口的功能

[Huawei-Eth-Trunk1] mixed-rate link enable

# 缺省情况下,设备未使能允许不同速率端口加入同一Eth-Trunk接口的功能,只能相同速率的接口加入到同一个Eth-Trunk接口中。

配置活动接口数:

[Huawei-Eth-Trunk1] max active-linknumber {number}

# 注意
# 在配置时,需保持两端的最大活动接口数一致,只有LACP模式支持配置最大活动接口数。

[Huawei-Eth-Trunk1] least active-linknumber {number}

# 本端和对端设备的活动接口数下限阈值可以不同,手动模式、LACP模式都支持配置最小活动接口数。
# 配置最小活动接口数目的是为了保证最小带宽,当前活动链路数目小于下限阈值时,Eth-Trunk接口的状态转为Down。

配置优先级

配置系统LACP优先级:

[Huawei] lacp priority priority

# 系统LACP优先级值越小,则优先级越高,缺省情况下,系统LACP优先级为32768。

配置接口LACP优先级:

[Huawei-GigabitEthernet0/0/1] lacp priority priority

# 在接口视图下配置接口LACP优先级。缺省情况下,接口的LACP优先级是32768。接口优先级取值越小,接口的LACP优先级越高。
# 在接口已加入到链路聚合中,才能够配置该命令。

# 注意事项
# 如果没有开启 Eth-Trunk 的抢占,则调整优先级之后,接口不会被切换
# lacp preempt enable

注意事项

A. Eth-Truk接口不能嵌套
B. 两台设备对接时需要保证两端设备上链路聚合的模式一致
C. GE接口和FE接口不能加入同一个Eth-Trunk接口
D. GE电接口和GE光接口不能加入同一个Eth-Trunk接口

路由器的聚合端口可以配置路由子接口(eNSP 模拟器后续无法配置)

Manual mode

如果有 VLAN 存在,才需要进行 VLAN 配置:

SW1:

[SW1] interface eth-trunk 1
[SW1-Eth-Trunk1] trunkport gigabitethernet 0/0/1 to 0/0/2
[SW1-Eth-Trunk1] port link-type trunk
[SW1-Eth-Trunk1] port trunk allow-pass vlan 10 20

SW2:进行类似配置