Chinaunix首页 | 论坛 | 博客
  • 博客访问: 214189
  • 博文数量: 48
  • 博客积分: 4011
  • 博客等级: 上校
  • 技术积分: 695
  • 用 户 组: 普通用户
  • 注册时间: 2009-06-26 17:15
文章分类

全部博文(48)

文章存档

2011年(1)

2010年(1)

2009年(46)

我的朋友

分类: 系统运维

2009-07-17 22:03:44

实验目的:

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

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

3PAgPCisco私有链路聚合协议。

 

实验拓扑图:

 


实验步骤及要求:

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

2、为了能够保证实验成功,因此建议将Fa1/0/1 – 22号接口置为shutdown状态。

3、在SW1SW2上查看交换机的STP信息:

SW1#show spanning-tree

 

VLAN0001

  Spanning tree enabled protocol ieee

  Root ID    Priority    32769

             Address     0014.a8e2.9880

             Cost        19

             Port        25 (FastEthernet1/0/23)

             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec

 

  Bridge ID  Priority    32769  (priority 32768 sys-id-ext 1)

             Address     0014.a8f1.9880

             Hello Time   2 sec  Max Age 20 sec  Forward Delay 15 sec

             Aging Time 300

 

Interface        Role Sts Cost      Prio.Nbr Type

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

Fa1/0/24         Altn BLK 19        128.26   P2p

[stanley1] 

SW1#

4STP协议虽然可以避免网络环路的问题。但是其仍然不能充分的利用冗余的链路带宽。为了解决链路带宽的问题,可以实施PAgP的链路聚合。

5、在SW1SW2上配置如下:

SW1(config)#[stanley2] 

SW1(config-if-range)#[stanley3] 

SW1(config-if-range)#[stanley4] 

SW1(config-if-range)#[stanley5] 

Creating a port-channel interface Port-channel 1

 

SW1(config-if-range)#exit

SW1(config)#exit

 

SW2(config)#interface range fastEthernet 1/0/23 - 24

SW2(config-if-range)#sw

SW2(config-if-range)#switchport

SW1(config-if-range)#[stanley6] 

SW2(config-if-range)#[stanley7] 

Creating a port-channel interface Port-channel 1

 

SW2(config-if-range)#exit

SW2(config)#exit

6、处于PAgPDescirable模式的接口,其会主动的进入协商状态。而Auto模式会进入被动的进入协商状态。

7、当在两台交换机完成相应配置后,IOS在配置过程中,会给出如下提示信息:

00:32:28: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet1/0/24, changed state to down

[stanley8] 

00:32:38: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet1/0/24, changed state to up

[stanley9] 

00:37:19: %LINEPROTO-5-UPDOWN: Line protocol on Interface Port-channel1, changed state to up[stanley10] 

8、查看SW1的接口的聚合信息:

SW1#show interfaces fastEthernet 1/0/23 etherchannel

Port state    = Up Mstr In-Bndl

    Gcchange = 0[stanley11] 

Port-channel  = Po1         GC   = 0x00010001      Pseudo port-channel = Po1

Port index    = 0           Load = 0x00            [stanley12] 

 

Flags:  S - Device is sending Slow hello.  C - Device is in Consistent state.

        A - Device is in Auto mode.        P - Device learns on physical port.

        d - PAgP is down.

Timers: H - Hello timer is running.        Q - Quit timer is running.

        S - Switching timer is running.    I - Interface timer is running.

 

[stanley13] 

                                Hello    Partner  PAgP     Learning  Group

Port      Flags State   Timers  Interval Count   Priority   Method  Ifindex

Fa1/0/23  SC    U6/S7   H       30s      1        128        Any      5001

 

[stanley14] 

 

          Partner              Partner          Partner         Partner Group

Port      Name                 Device ID        Port       Age  Flags   Cap.

Fa1/0/23  SW2                  0014.a8e2.9880   Fa1/0/23    20s SAC     10001

 

Age of the port in the current state: 00d:00h:06m:53s

         

 

SW1#

9、使用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:00h:15m:37s

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

GC                  = 0x00010001      HotStandBy port = null

Port state          = Port-channel Ag-Inuse

Protocol            =   PAgP

 

Ports in the Port-channel:

 

Index   Load   Port     EC state        No of bits

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

  0     00     Fa1/0/24 Desirable-Sl       0

[stanley15]          

Time since last port bundled:    00d:00h:10m:27s    Fa1/0/24

 

 

SW1#

10、查看聚合链路的汇总信息:

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

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

[stanley16] 

 

SW1#

11、查看生成树信息:

SW1#show spanning-tree

 

………

 

Interface        Role Sts Cost      Prio.Nbr Type

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

[stanley17] 

 

SW1#

12、配置SW1SW2VLAN 1IP地址,测试聚合链路的容错:

SW1(config)#interface vlan 1

SW1(config-if)#ip address 192.168.1.1 255.255.255.0

SW1(config-if)#no shutdown

SW1(config-if)#exit

 

SW2(config)#interface vlan 1

SW2(config-if)#ip address 192.168.1.2 255.255.255.0

SW2(config-if)#no shutdown

SW2(config-if)#exit

13、在R1上使用ping命令,测试两台交换机的连接:

SW2#ping 192.168.1.1

 

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 192.168.1.1, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/1 ms

SW2#

14、为了能够测试聚合端口的冗余容错特性,在SW2上使用扩展的ping命令向SW1持续发送ICMP数据包:

SW2#ping            

Protocol [ip]:    

[stanley18] 

[stanley19] 

Datagram size [100]:

Timeout in seconds [2]:

Extended commands [n]:

Sweep range of sizes [n]:

Type escape sequence to abort.

Sending 1000000, 100-byte ICMP Echos to 192.168.1.1, timeout is 2 seconds:

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

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

16、之前所配置的是第二层的PAgP的链路聚合,接下来配置向各位展示了如何配置第三层的PAgP的链路聚合。

17、首先删除之前的二层PAgP的配置。

18、在SW1SW2上作如下配置:

SW1(config)#interface port-channel 1

SW1(config-if)#[stanley20] 

SW1(config-if)#ip address 192.168.1.1 255.255.255.0

SW1(config-if)#no shutdown

SW1(config-if)#exit

SW1(config)#

SW1(config)#

SW1(config)#interface range fastEthernet 1/0/23 - 24

SW1(config-if-range)#no switchport

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

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

SW1(config-if-range)#exit

SW1(config)#exit

SW1#

00:12:16: %EC-5-L3DONTBNDL1: Fa1/0/24 suspended: PAgP not enabled on the remote port.[stanley21] 

 

SW2(config)#interface port-channel 1

SW2(config-if)#no switchport

SW2(config-if)#ip address 192.168.1.2 255.255.255.0

SW2(config-if)#no shutdown

SW2(config-if)#exit

SW2(config)#

SW2(config)#interface range fastEthernet 1/0/23 - 24

SW2(config-if-range)#no switchport

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

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

SW2(config)#exit

SW2#

00:20:02: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet1/0/23, changed state to up

00:20:02: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet1/0/24, changed state to up

00:20:03: %LINK-3-UPDOWN: Interface Port-channel1, changed state to up

[stanley22] 

17、查看聚合链路的信息:

SW2#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

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

[stanley23] 

 

SW2#

18、使用Ping命令检测:

SW2#ping 192.168.1.1

 

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 192.168.1.1, timeout is 2 seconds:

.!!!!

Success rate is 80 percent (4/5), round-trip min/avg/max = 1/1/1 ms

SW2#

19、使用步骤14和步骤15检查第三层的聚合链路的容错性。具体不再列出。

20、实验完成。


默认情况下,交换机会使用STP协议阻塞其中的某个端口。因为交换机认为网络有环路存在。

进入2324号端口。

开启交换机的二层特性。此条命令默认是被启用的。

指定聚合的协议。

将当前端口组加入到channel-group即聚合链路通道1。同时将聚合工作模式设置为积极模式。

指定聚合的协议。

将端口组加入到聚合链路通道1。同时将其设置为自动模式。

当改变接口工作方式后,会导致接口的DOWN

交换机在重置端口将其置为UP状态。

当与对端交换机协商成功后,其port-channel 1的会进入UP状态。指出链路聚合配置成功。

聚合组及其工作模式。

聚合使用协议。

本地被聚合的接口信息。

对端的聚合的接口信息。

处于聚合组的一些端口列表。

 

关键字(SU)中的S指出当前的聚合路链路属于第二层聚合。

此时,生成树协议仅针对被聚合的逻辑端口工作。

配置目标地址。

PING的值设置一个较大的值。

关闭交换机接口的二层特性。

由于目前仅配置SW1,而SW2并没有配置。所以此处系统提示,远程主机没有激活PAgP聚合。

当配置完SW2交换机后,系统提示聚合链路已经处于UP状态。

RU的状态的其中,R指出目前聚合链路为第三层的聚合。

阅读(1399) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~