cisco pagp 詳解

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私有鏈路聚合協議。



實驗步驟及要求:

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數據包不會出現中斷,說明鏈路聚合能夠有效的避免單鏈路的拓撲不穩定,同時解決了冗餘鏈路情況下,由於生成樹原因而不能充分利用鏈路帶寬和實現負載分擔的問題。



發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章