Etherchannel 的一些认识
 
含义 :将两个设备间多条物理链路绑定成一条逻辑链路 从而达到增加带宽 提供冗余 防止环路的目的
 
注:1.etherchannel不支持10m端口   2.cisco设备允许绑定8个端口 3.所有的物理端口必须要有相同的速率和双工模式 相同的vlan 干路模式 允许的vlan范围
 
强制模式启用etherchannel   最好是在两台设备上配好后再接线 防止环路)
(config)#interface port-channel 1                  启用etherchannel
(config-if)#switchport mode trunk
(config-if)#switchport trunk encapsulation dot1q
(config)#int range f1/1 -2
(config-if-range)#sw mode trunk
(config-if-range)#switchport trunk encapsulation dot1q
(config-if-range)#channel-group 1 mode on            将端口加入到channel 1中
#show etherchannel summary         显示绑定的接口
(config)#no interface port-channel 1          删除 etherchannel
 
 
etherchannel端口间协商是使用PAGP(Port Aggregation Protocol,cisco专有)或LACP (Link Aggregation Control Protocol,802.3AD
 
PAGP的三种模式
desirable 表示该端口会主动发PAGP数据包与对端进行协商
auto 表示该端口不会主动发PAGP数据包与对端进行协商
on 表示强制将该端口加入etherchannel,不需用PAGP协议与对端进行协商
 
 
LACP的两种模式,
active 表示该端口会主动发LACP数据包与对端进行协商

passive 表示该端口不会主动发LACP数据包与对端进行协商
采用 lacp 协议时,以下几种模式可以构建EtherChannel:
 

 
On
Active
Passive
On
×
×
Active
×
Passive
×
×

 
pagp 协议时,以下几种模式可以构建EtherChannel
 

 
On
Desirable
Auto
On
×
×
Desirable
×
Auto
×
×

 
 
配置三层交换机的etherchannel
(config)#int port-channel 1
(config-if)#no switchport            启用三层
#ip address 172.16.1.1 255.255.255.0         
(config)#int range f1/1 -2
(config-if-range)#no switchport
             # Channel-group 1 mode desirable 加入到channel 1 模式是desirable
       
负载(config)# port-channel load-balance ?
   dst-ip       Dst IP Addr      基于源ip负载
 dst-mac      Dst Mac Addr
 src-dst-ip   Src XOR Dst IP Addr   基于源目的ip负载 以下类同
 src-dst-mac Src XOR Dst Mac Addr
 src-ip       Src IP Addr
 src-mac      Src Mac Addr
 
 
#show intface port ?     查看etherchannel的相关信息
#show etherchannel ?
 <1-6>         Channel group number
 brief         Brief information
 detail        Detail information
 load-balance Load-balance/frame-distribution scheme among ports in
                port-channel
 port          Port information
 port-channel Port-channel information
 summary       One-line summary per channel-group