端口聚合Port-Channel

端口汇聚是一种逻辑上的抽象过程,将一组具备相同属性的端口,抽象成一个逻辑端口。port channel是一组物理端口的集合体,在逻辑上被当作一个物理端口。对用户来讲,完全可以将这个port channel 当作一个端口使用,因此不仅能增加网络的带宽,还能提供链路的备份功能

为使port channel 正常工作,port channel 的成员端口必须具备以下相同的属性

  1 端口均为全双工模式;

2端口速率相同;

3 端口的类型必须一样,比如同为以太口或同为光纤口;

  4 端口同为access 端口并且属于同一个vlan 或同为trunk 端口;

5 如果端口为trunk 端口,则其allowed vlan 和native vlan属性也应该相同。

 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,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

相关文章

迭代器模式(Iterator)迭代器模式(Iterator)[Cursor]意图...
高性能IO模型浅析服务器端编程经常需要构造高性能的IO模型,...
策略模式(Strategy)策略模式(Strategy)[Policy]意图:定...
访问者模式(Visitor)访问者模式(Visitor)意图:表示一个...
命令模式(Command)命令模式(Command)[Action/Transactio...
生成器模式(Builder)生成器模式(Builder)意图:将一个对...