H3C 5120配置链路聚合(动态LACP)
网络拓扑图如下:
组网需求【华三默认链路聚合模式是静态模式】:
- Device A与Device B通过各自的以太网端口GigabitEthernet1/0/1~GigabitEthernet1/0/3相互连接
- 在Device A和Device B上分别配置链路聚合组,并使两端的VLAN 10和VLAN 20之间分别互通
(1) 配置Device A
<DeviceA> system-view
[DeviceA] vlan 10
[DeviceA-vlan10] port gigabitEthernet 1/0/4
[DeviceA-vlan10] quit
[DeviceA] vlan 20
[DeviceA-vlan20] port gigabitEthernet 1/0/5
[DeviceA-vlan20] quit
[DeviceA] interface bridge-aggregation 1 #创建二层聚合组1
[DeviceA-Bridge-Aggregation1] quit
[DeviceA] interface gigabitethernet 1/0/1
[DeviceA-gigabitethernet1/0/1] port link-aggregation group 1 #将端口加入聚合组1
[DeviceA-gigabitethernet1/0/1] quit
[DeviceA] interface gigabitethernet 1/0/2
[DeviceA-gigabitethernet1/0/2] port link-aggregation group 1 #将端口加入聚合组1
[DeviceA-gigabitethernet1/0/2] quit
[DeviceA] interface gigabitethernet 1/0/3
[DeviceA-gigabitethernet1/0/3] port link-aggregation group 1 #将端口加入聚合组1
[DeviceA-gigabitethernet1/0/3] quit
[DeviceA] interface bridge-aggregation 1 #进入聚合组1
[DeviceA-Bridge-Aggregation1] port link-type trunk #配置聚合组端口类型为trunk
[DeviceA-Bridge-Aggregation1] port trunk permit vlan 10 20 #允许vlan 10 20通过
[DeviceA-Bridge-Aggregation1] link-aggregation mode dynamic #配置链路聚合模式为动态LACP模式
link-aggregation load-sharing mode destination-mac #聚合端口组链路基于目的mac实现链路负载分担,有些设备可能不支持,不配置也能用,两端都配置
(2) 配置Device B
Device B的配置与Device A相似,配置过程略
(3) 检验配置效果
# 查看Device A上所有聚合组的摘要信息,工作模式是Dynamic动态,有3条线路被选中,1条未选中
[DeviceA] display link-aggregation summary
#查看聚合口状态,哪些端口加入聚合组
[DeviceA] dis link-aggregation verbose
(4) 修改端口优先级,使流量优先走指定的端口,选中的端口后有 (R)
<Sysname> system-view [Sysname] interface gigabitethernet 1/0/48 [Sysname-GigabitEthernet1/0/1] link-aggregation port-priority 1000 #端口优先级,默认值32678,取值范围为0~65535,该数值越小,优先级越高,两端相连的接口都需配置