您当前的位置:五五电子网电子知识电工技术电工基础交换机端口聚合配置的步骤 正文
交换机端口聚合配置的步骤

交换机端口聚合配置的步骤

点击数:7756 次   录入时间:03-04 11:52:58   整理:http://www.55dianzi.com   电工基础

参与聚合的端口必须具备相同的属性,如相同的速度、单双工模式、trunk模式、trunk封装方式和VLAN等。 端口配置模式下使用命令: 
channel-group number mode [active|auto|desirable |on|passive] 
进行配置。 
参数说明: 
active 只使用LACP协议(Enable LACP unconditionally) 
auto 使用PAgP仅当对端设备使用PagP时( Enable PAgP only if a PAgP device is detected) 
desirable 只使用PAgP(Enable PAgP unconditionally) 
on 只进行端口聚合,默认使用PAgP(Enable Etherchannel only) 
passive 使用LACP仅当对端设备使用LACP 时(Enable LACP only if a LACP device is detected) 
两端设备对应端口聚合应该使用同样的协议,否则至少有一端的聚合不会成功。 
1.配置实例 
比如在如图所示的网络中,两核心交换机之间的链路采用两个端口的EtherChannel。 

配置步骤: 
Sw0(config)#interface range G0/1-2 //配置G0/1和G0/2口 
Sw0 (config-if)#channel-group 10 mode on //可理解为把G0/1-2加入10号逻辑端口组(通道组) 
Sw0(config-if)#exit 
Sw1(config)#interface range G0/1-2 
Sw1(config-if)#channel-group 10 mode on 
Sw1(config-if)#exit 
2. 查看配置: 
SW1#show etherchannel summary 
Flags: D - down P - in port-channel 
I - stand-alone s - suspended 
H - Hot-standby (LACP only) 
R - Layer3 S - Layer2 
U - in use f - failed to allocate aggregator 
u - unsuitable for bundling 
w - waiting to be aggregated 
d - default port 
Number of channel-groups in use: 1 
Number of aggregators: 1 
Group Port-channel Protocol Ports 
------+-------------+-----------+---------------------------------------------- 
10 Po10(SU) PAgP Gig0/1(P)Gig0/2(P) 
显示这两个接口已经捆绑成为一个通道组接口Port-channel 10,Po10(SU)中的“S”说明这个通道组接口工作在第二层,U表示已在使用,使用的协议为PAgP,通道组聚合了两个接口Gig0/1和Gig0/2。 
Cisco 3560交换机支持48个EtherChannel 配置,每组最多支持8个端口聚合。 
同一对交换机上若有两条以上的EtherChannel逻辑链路,则同样会被生成树协议阻塞通道组端口,成为备份链路,只留下一条逻辑链路处于工作状态。 
3.负载均衡配置 
EtherChannel可以自动执行负载均衡,当EtherChannel执行负载均衡时,按照默认策略进行。 
可以根据不同条件来决定和配置负载均衡策略。如MAC地址、IP地址等都可以作为负载均衡策略的参数。但是不是每种交换机都能支持所有这些参数,越高端的交换机支持的参数就越多。 
例如,Cisco 3560的负载均衡配置 
Switch(config)#port-channel load-balance ? 
dst-ip Dst IP Addr 
dst-mac Dst Mac Addr 
src-dst-ip Src XOR Dst IP Addr 
src-dst-mac Src XOR Dst Mac Addr 
src-ip Src IP Addr 
src-mac Src Mac Addr 
支持多种策略。


本文关键字:交换机  电工基础电工技术 - 电工基础

《交换机端口聚合配置的步骤》相关文章>>>