端口汇聚是一种逻辑上的抽象过程,将一组具备相同属性的端口,抽象成一个逻辑端口。port channel是一组物理端口的集合体,在逻辑上被当作一个物理端口。对用户来讲,完全可以将这个port channel 当作一个端口使用,因此不仅能增加网络的带宽,还能提供链路的备份功能。
为使port channel 正常工作,port channel 的成员端口必须具备以下相同的属性:
1 端口均为全双工模式;
2 端口速率相同;
4 端口同为access 端口并且属于同一个vlan 或同为trunk 端口;
PAgP(Port Aggregation Protocol)端口聚集协议帮助在快速以太通道链接中联系自动生成
LACP(Link Aggregation Control Protocol,链路汇聚控制协议)是一种实现链路动态汇聚的协议
PAGP 属于cisco私有协议,LACP是公有协议。
PAgP的工作模式 ------- 对应的 LACP工作模式
on(开) ------- on
auto(自动) ------- passive
desirable(主动)------- active
以上来自互联网
配置设备WEB IOU ,配置拓扑:
命令:
SW1(config)#interface port-channel 1 建立一个以太网port-channel 1
SW1(config-if)#switchport trunk encapsulation dot1q port-channel 1 中的接口trunk封装的类型 (35一下的貌似可以不用)
SW1(config-if)#switchport mode trunk port-channel 1 封装为trunk模式
SW1(config-if)#speed 100 设置port-channel 的端口速率
SW1(config-if)#duplex full 设置port-channel 的双工模式
SW1(config)#interface ethernet 0/0
SW1(config-if)#speed 100
SW1(config-if)#duplex full
SW1(config-if)#switchport trunk encapsulation dot1q
SW1(config-if)#switchport mode trunk
SW1(config-if)#channel-group 1 mode on 设置将接口加入channel-group 1中,并定义模式为手动聚合(ON不属于任何协议)
SW1(config)#interface ethernet 0/1
SW2 配置如上
查看命令
SW1#show etherchannel summary 查看端口聚合的汇总信息
Flags: D - down P - bundled in port-channel
I - stand-alone s - suspended
H - Hot-standby (LACP only)
R - Layer3 S - Layer2
U - in use N - not in use, no aggregation
f - failed to allocate aggregator
M - not in use, no aggregation due to minimum links not met
m - not in use, port not aggregated due to minimum links not met
u - unsuitable for bundling
d - default port
w - waiting to be aggregated
Number of channel-groups in use: 1
Number of aggregators: 1
Group Port-channel Protocol Ports
------+-------------+-----------+-----------------------------------------------
1 Po1(SU) - Et0/0(P) Et0/1(P)
SW2#show etherchannel summary
Flags: D - down P - bundled in port-channel
I - stand-alone s - suspended
H - Hot-standby (LACP only)
R - Layer3 S - Layer2
U - in use N - not in use, no aggregation
f - failed to allocate aggregator
M - not in use, no aggregation due to minimum links not met
m - not in use, port not aggregated due to minimum links not met
u - unsuitable for bundling
d - default port
w - waiting to be aggregated
Number of channel-groups in use: 1
Number of aggregators: 1
Group Port-channel Protocol Ports
------+-------------+-----------+-----------------------------------------------
1 Po1(SU) - Et0/0(s) Et0/1(P)
SW1(config-if)#channel-group 1 mode desirable 模式变为PAGP协议
SW1(config-if)#channel-group 1 mode active 模式变为LACP协议
SW2 对端依据协商模式来配置,
desirable-desirable
desirable-auto
active-active
active-passive