3配置步骤
⑴交换机A的配置
system-view #进入系统视图
[H3C]vlan 10 #创建VLAN 10
[H3C-vlan10]port gigabitethernet 1/0/4 #将端口GigabitEthernet1/0/4加入到该VL AN 10中
[H3C-vlan10]quit
[H3C] vlan 20 #创建VL AN 20,
[H3C -vlan20] port gigabitethernet 1/0/5 #将端口GigabitEthernet1/0/5加入到该VLAN 20中。
[H3C-vlan20] quit
[H3C]interface bridge - aggregation 1 #创建二层聚合接口1。(根据具体情况选择下面两种方式之一)采用静态聚合模式:创建二层聚合接口1
[H3C- Bridge - Aggregation1] quit
采用动态聚合模式:创建二层聚合接口,并配置动态聚合模式
[H3C]interface bridge - aggregation 1
[H3C- Bridge - Aggregation1] link -aggregation mode dynamic
[H3C- Bridge - Aggregation1] quit
#分别将端口GigabitEthernet1/0/1至GigabitEthernet1/0/3加入到聚合组1中。
[H3C]interface gigabitethernet 1/0/1
[H3C-GigabitEthernet1/0/1] port link- aggregation group 1
[H3C- GigabitEthernet1/0/1] quit
[H3C]interface gigabitethernet 1/0/2
[H3C-GigabitEthernet1/0/2] port link- aggregation group 1
[H3C-GigabitEthernet1/0/2] quit
[H3C]interface gigabitethernet 1/0/3
[H3C-GigabitEthernet1/0/3] port link- aggregation group 1
[H3C-GigabitEthernet1/0/3] quit
#配置二层聚合接口1为Trunk端口,并允许VLAN 10和VLA N 20的报文通过。
[H3C]interface bridge- aggregation 1
[H3C- Bridge- Aggregation1] port link -type trunk
[H3C- Bridge- Aggregation1] port trunk permit VLAN 10 20
[H3C- Bridge - Aggregation1] quit
[H3C]save force #保存配置信息
⑵Switch B上的配置与Switch A完全相同,此处不再赘述。
⑶检查配置效果
[H3C] display link- aggregation verbose #显示聚合组的相关信息,以验证配置是否成功
结果说明:本端和对端设备上聚合组内的成员端口都处于Selected状态。原因是在动态链路聚合中通过L ACP协议报文交互,可使两端聚合组内的成员端口选中状态达成一致,可顺利实现对用户数据的转发。