1.设计条件
我准备先创建一个聚合口,然后把2口和4口加入聚合口
2.汇聚口配置情况如下
[huiju-switch]interface Bridge-Aggregation 1
[huiju-switch-Bridge-Aggregation1]dis th
#
interface Bridge-Aggregation1
port link-type trunk ###因为是trunk口
port trunk permit vlan all ###允许所有vlan通过
3.接口设置如下:
[huiju-switch]interface GigabitEthernet 1/0/2
[huiju-switch-GigabitEthernet1/0/2]dis th
#
interface GigabitEthernet1/0/2
description switch-switch
port link-type trunk ###除了汇聚口设置外,端口也要设置
port trunk permit vlan all ###除了汇聚口设置外,端口也要设置
speed 1000 ##设置相同速率
duplex full ##开启全双工模式
port link-aggregation group 1 ##端口加入汇聚口
端口4也是同样的操作
[huiju-switch]int g 1/0/4
[huiju-switch-GigabitEthernet1/0/4]dis th
#
interface GigabitEthernet1/0/4
port link-type trunk
port trunk permit vlan all
speed 1000
duplex full
port link-aggregation group 1
总结:之前遇到的坑是只在聚合口做了trunk,没有在2端口和4端口做trunk等操作,导致了这个聚合口一起处于down状态,后来摸索和网上查资料才解决了这个问题。