端口聚合是将两个设备间多条物理链路捆绑在一起组成一条逻辑链路,从而达到带宽倍增的目的,除了增加带宽外,端口聚合还可以在多条链路上均衡分配流量,起到负载分担的作用,流量将转移到其它的链路上,整个过程在几毫秒内完成,从而起到冗余的作用,增强了网络的稳定性和安全性
实验环境:
Cisco Packet Tracer 6.02台2960交换机2台PC
拓扑图
#Switch0:Switch>en//进入特权模式Switch#conf t //进入全局配置模式Enter configuration commands, one per line. End with CNTL/Z.Switch(config)#int ra fa0/1-2//选择fa0/1和fa0/2Switch(config-if-range)#sw mode tr//将fa0/1和fa0/2工作模式设置为trunkSwitch(config-if-range)#%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to down%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/2, changed state to down%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/2, changed state to upSwitch(config-if-range)#channel-group 1 mode on//将fa0/1~fa0/2加入聚合组1并开启Switch(config-if-range)#ex//退出选择fa0/1和fa0/2Switch(config)#port-channel load dst-ip//负载均衡Switch(config)#ex//退出全局配置模式Switch#
#Switch1:Switch>en//进入特权模式Switch#conf t//进入全局配置模式Enter configuration commands, one per line. End with CNTL/Z.Switch(config)#int ra fa0/1-2//选择fa0/1和fa0/2Switch(config-if-range)#sw mode tr//将fa0/1和fa0/2工作模式设置为trunkSwitch(config-if-range)#%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to down%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to upSwitch(config-if-range)#channel-group 1 mode on//将fa0/1~fa0/2加入聚合组1并开启Switch(config-if-range)#ex//退出选择fa0/1和fa0/2Switch(config)#port-channel load dst-ip//负载均衡Switch(config)#ex//退出全局配置模式Switch#