Ether Channel(以太通道)是由Cisco研发的,应用于交换机之间的多链路捆绑技


术。它的基本原理是:将两个设备间多条相同特性的快速以太或千兆位以太物理


链路捆绑在一起组成一条逻辑链路,从而达到带宽倍增的目的。除了增加带宽外,


Ether Channel还可以在多条链路上均衡分配流量,起到负载分担的作用;当一


条或多条链路故障时,只要还有链路正常,流量将转移到其它的链路上,整个过


程在几毫秒内完成,从而起到冗余的作用,增强了网络的稳定性和安全性。在


Ether Channel中,负载在各个链路上的分布可以根据源IP地址、目的IP地址、


源MAC地址、目的MAC地址、源IP地址和目的IP地址组合,以及源MAC地址和


目的MAC地址组合等来进行分布。两台交换机之间是否形成Ether Channel也可


以用协议自动协商。目前有两个协商协议:PAgP和LACP,PAgP(端口汇聚协议


Port Aggregation Protocol)是Cisco私有的协议,而LACP(链路汇聚控制协议


Link Aggregation Control Protocol)是基于IEEE 802.3ad的国际标准。



实验目的:

1、掌握其于Cisco私有的PAgP的链路聚合协议的配置方法。

2、掌握第二层与第三层的PAgP配置区别。

3、PAgP为Cisco私有链路聚合协议。


cisco pagp 详解_第1张图片


实验步骤及要求:

1、本实验使用两台Cisco Catalyst 3750交换机。并按照拓扑连接相应的交换机的线缆。

2、为了能够保证实验成功,因此建议将Fa0/3 -24号接口置为shutdown状态。

在sw1和sw2配置如下:


sw1(config)#interface port-channel 1

Switch1(config)#interface range fa0/1 -2

Switch1(config-if-range)#switchport

Switch1(config-if-range)#channel-protocol pagp

Switch1(config-if-range)#channel-group 1 mode desirable




sw2(config)#interface port-channel 1

sw2(config)#interface range fa0/1 -2

sw2(config-if-range)#switchport

sw2(config-if-range)#channel-protocol pagp

sw2(config-if-range)#channel-group 1 mode auto

sw2(config-if-range)#exit





注:处于PAgP的Descirable模式的接口,其会主动的进入协商状态。而Auto模式会进入被动的进入协商状态。



当我们改变端口的工作模式后,会提示借口down掉,交换机重置端口后,会提示up,当交换机协商成功后,与对端交换机协商成功后,其port-channel 1的会进入UP状态。指出链路聚合配置成功。


以太通道的负载平衡方式有:dst-ip、dst-mac、src-dst-ip、src-dst-mac、src-ip、src-mac,默认情况下是基于源MAC地址的负载平衡

sw1(config)#port-channel load-balance src-mac


Sw2(config)#port-channel load-balance dst-mac


使用show etherchannel port-channel命令查看聚合组信息:


sw1#show etherchannel port-channel

               Channel-group listing:

               ----------------------


Group: 1

----------

               Port-channels in the group:

               ---------------------------


Port-channel: Po1

------------


Age of the Port-channel   = 00d:02h:43m:12s

Logical slot/port   = 2/1       Number of ports = 2

GC                  = 0x00000000      HotStandBy port = null

Port state          = Port-channel

Protocol            =   PAGP

Port Security       = Disabled


Ports in the Port-channel:


Index   Load   Port     EC state        No of bits

------+------+------+------------------+-----------

 0     00     Fa0/2    Desirable-Sl       0

 0     00     Fa0/1    Desirable-Sl       0

Time since last port bundled:    00d:02h:43m:12s    Fa0/1


查看聚合链路汇总信息:

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

------+-------------+-----------+----------------------------------------------


1      Po1(SU)           PAgP   Fa0/1(P) Fa0/2(P)


测试:

配置SW1和SW2的VLAN 1的IP地址,测试聚合链路的容错

sw1(config)#interface vlan 1

sw1(config-if)#ip add 192.168.1.1 255.255.255.0

sw1(config-if)#no sh


Sw2(config)#interface vlan 1

Sw2(config-if)#ip add 192.168.1.2 255.255.255.0

Sw2(config-if)#no sh



Sw1 ping sw2 ,是通的,这时我们ping1000个包,然后在SW1上将聚合组中的Fastethernet 1/0/24或Fastethernet 1/0/24任一端口手工shutdown后,观察SW2的ping的反馈信息。会发现其Ping数据包不会出现中断,说明链路聚合能够有效的避免单链路的拓扑不稳定,同时解决了冗余链路情况下,由于生成树原因而不能充分利用链路带宽和实现负载分担的问题。