链路聚合将交换机上的多个端口在物理上连接起来,在逻辑上捆绑在一起。
1、形成较大宽带的端口。
2、实现负载分担,并提供冗余链路。
配置交换机Switch0: Switchen Switch#conf Switch(config)#interface range fa0/1-2 Switch(config-if-range)#switchport mode trunk//设置端口模式为trunk Switch(config-if-range)# Switch(config-if-range)#channel-group 1 mode on//加入链路组1并开启 Switch(config-if-range)# Switch(config-if-range)#exit Switch(config)#port-channel load-balance dst-ip//按照目标主机IP地址数据分发来实现负载平衡 Switch(config)#exit Switch#show etherchannel summary
配置交换机Switch1: Switchen Switch#config t Switch(config)#interface range fa0/1-2 Switch(config-if-range)#switchport mode trunk//设置端口模式为trunk Switch(config-if-range)#channel-group 1 mode on//加入链路组1并开启 Switch(config-if-range)# Switch(config-if-range)#exit Switch(config)#port-channel load-balance dst-ip//按照目标主机IP地址数据分发来实现以太网通道组负载平衡 Switch(config)#exit Switch# Switch#show etherchannel summary//显示以太网通道组的情况
计算机PC0的设置: IP:192.168.1.2 子网掩码:255.255.255.0
计算机PC1的设置: IP:192.168.1.3 子网掩码:255.255.255.0
PC0ping PC1 :测试PC0到PC1的连通。
PC1ping PC0 :测试PC1到PC0的连通。