任务二:中兴设备实现链路聚合
一、目的
掌握交换机的链路静态聚合和动态聚合的配置和使用
二、内容
静态聚合和动态聚合的配置
三、设备
3228 直连网线 串口线
两台 两条 一条
四、拓扑
交换机 3228-1 和交换机 3228-2 通过 smartgroup 端口相连,它们分别由 2 个物理端口聚合而成。smartgroup 的端口模式为 trunk,承载 VLAN10 和 VLAN20。
五、配置步骤
1、静态聚合
下面以 3228-1 为例进行配置说明: /*关于 VLAN 的部分自己完成*/ /*创建 Trunk 组*/
ZXR10(config)#interface smartgroup1 【创建 smartgroup 端口,它有两个物理端口汇聚
而成】
ZXR10(config-if)#smartgroup mode on /*绑定端口到 Trunk 组*/ ZXR10(config)#interface fei_1/1 ZXR10(config-if)#smartgroup 1 mode on 机也都必须都设为静态的‘ON’】
ZXR10(config)#interface fei_1/2
ZXR10(config-if)#smartgroup 1 mode on【将端口 FE-1/1 和 FE-1/2 设置为聚合端口放置在 smartgroup 1 并以静态方式工作】
/*修改 smartgroup 端口的 VLAN 链路类型*/ ZXR10(config)#interface smartgroup1 ZXR10(config-if)#switchport mode trunk
ZXR10(config-if)#switchport trunk vlan 10 //把 smartgroup1 端口以 trunk 方式加入 vlan10 ZXR(config-if)#switchport trunk vlan 20
//把 smartgroup1 端口以 trunk 方式加入 vlan10 //设置聚合模式为静态【设为静态的,两台交换
2、动态聚合
下面以 3228-1 为例进行配置说明: /*创建 Trunk 组*/
ZXR10(config)#interface smartgroup1 ZXR10(config-if)#smartgroup mode 802.3ad /*绑定端口到 Trunk 组*/ ZXR10(config)#interface fei_1/1
ZXR10(config-if)#smartgroup 1 mode active 为 active。】
ZXR10(config)#interface fei_1/2
ZXR10(config-if)#smartgroup 1 mode active /*修改 smartgroup 端口的 VLAN 链路类型*/ ZXR10(config)#interface smartgroup1 ZXR10(config-if)#switchport mode trunk
//设置聚合模式为 active【配置动态链路
聚合时,应当将一端端口的聚合模式设置为 active,另一端设置为 passive,或者两端都设置
ZXR10(config-if)#switchport trunk vlan 10 vlan10
ZXR(config-if)#switchport trunk vlan 20
//把 smartgroup1 端口以 trunk 方式加入
注:聚合模式设置为 on 时端口运行静态 trunk,参与聚合的两端都需要设置为 on 模式。 聚合模式设置为 active 或 passive 时端口运行 LACP,active 指端口为主动协商模式,passive 指端口为被动协商模式。配置动态链路聚合时,应当将一端端口的聚合模式设置为 active, 另一端设置为 passive,或者两端都设置为 active。
六、 验证方法
1、使用命令 show lacp 1 internal 查看 trunk 组 1 中成员端口的聚合状态。Selected 表示聚合 成功。
ZXR10(config)#show lacp 1 internal 记录显示结果
2、PC1 和 PC2 不能互通,PC3 和 PC4 不能互通 PC1 和 PC3 互通,PC2 和 PC4 互通