实验目的: 1、掌握其于Cisco私有的PAgP的链路聚合协议的配置方法。 2、掌握第二层与第三层的PAgP配置区别。 3、PAgP为Cisco私有链路聚合协议。 实验拓扑图: 实验步骤及要求: 1、本实验使用两台Cisco Catalyst 3750交换机。并按照拓扑连接相应的交换机的线缆。 2、为了能够保证实验成功,因此建议将Fa1/0/1 – 22号接口置为shutdown状态。 3、在SW1或SW2上查看交换机的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/23 Root FWD 19 128.25 P2p Fa1/0/24 Altn BLK 19 128.26 P2p [stanley1] SW1# 4、STP协议虽然可以避免网络环路的问题。但是其仍然不能充分的利用冗余的链路带宽。为了解决链路带宽的问题,可以实施PAgP的链路聚合。 5、在SW1和SW2上配置如下: SW1(config)#interface range fastEthernet 1/0/23 - 24 [stanley2] SW1(config-if-range)#switchport [stanley3] SW1(config-if-range)#channel-protocol pagp [stanley4] SW1(config-if-range)#channel-group 1 mode desirable [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)#channel-protocol pagp [stanley6] SW2(config-if-range)#channel-group 1 mode auto [stanley7] Creating a port-channel interface Port-channel 1 SW2(config-if-range)#exit SW2(config)#exit 6、处于PAgP的Descirable模式的接口,其会主动的进入协商状态。而Auto模式会进入被动的进入协商状态。 7、当在两台交换机完成相应配置后,IOS在配置过程中,会给出如下提示信息: 00:32:28: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet1/0/23, changed state to down 00:32:28: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet1/0/24, changed state to down [stanley8] 00:32:37: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet1/0/23, changed state to up 00:32:38: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet1/0/24, changed state to up [stanley9] 0:37:18: %LINK-3-UPDOWN: Interface Port-channel1, changed state to up 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 Channel group = 1 Mode = Desirable-Sl Gcchange = 0 [stanley11] Port-channel = Po1 GC = 0x00010001 Pseudo port-channel = Po1 Port index = 0 Load = 0x00 Protocol = PAgP [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. Local information: [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 Partner's information: [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/23 Desirable-Sl 0 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 ------+-------------+-----------+----------------------------------------------- 1 Po1(SU) PAgP Fa1/0/23(P) Fa1/0/24(P) [stanley16] SW1# 11、查看生成树信息: SW1#show spanning-tree ……… Interface Role Sts Cost Prio.Nbr Type ---------------- ---- --- --------- -------- -------------------------------- Po1 Root FWD 12 128.616 P2p [stanley17] SW1# 12、配置SW1和SW2的VLAN 1的IP地址,测试聚合链路的容错: 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]: Target IP address: 192.168.1.1 [stanley18] Repeat count [5]: 1000000 [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/24或Fastethernet 1/0/24任一端口手工shutdown后,观察SW2的ping的反馈信息。会发现其Ping数据包不会出现中断,说明链路聚合能够有效的避免单链路的拓扑不稳定,同时解决了冗余链路情况下,由于生成树原因而不能充分利用链路带宽和实现负载分担的问题。 16、之前所配置的是第二层的PAgP的链路聚合,接下来配置向各位展示了如何配置第三层的PAgP的链路聚合。 17、首先删除之前的二层PAgP的配置。 18、在SW1和SW2上作如下配置: SW1(config)#interface port-channel 1 SW1(config-if)#no switchport [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:15: %EC-5-L3DONTBNDL1: Fa1/0/23 suspended: PAgP not enabled on the remote port. 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 00:20:04: %LINEPROTO-5-UPDOWN: Line protocol on 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 ------+-------------+-----------+----------------------------------------------- 1 Po1(RU) PAgP Fa1/0/23(P) Fa1/0/24(P) [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协议阻塞其中的某个端口。因为交换机认为网络有环路存在。 进入23,24号端口。 开启交换机的二层特性。此条命令默认是被启用的。 指定聚合的协议。 将当前端口组加入到channel-group即聚合链路通道1。同时将聚合工作模式设置为积极模式。 指定聚合的协议。 将端口组加入到聚合链路通道1。同时将其设置为自动模式。 当改变接口工作方式后,会导致接口的DOWN。 交换机在重置端口将其置为UP状态。 当与对端交换机协商成功后,其port-channel 1的会进入UP状态。指出链路聚合配置成功。 聚合组及其工作模式。 聚合使用协议。 本地被聚合的接口信息。 对端的聚合的接口信息。 处于聚合组的一些端口列表。 关键字(SU)中的S指出当前的聚合路链路属于第二层聚合。 此时,生成树协议仅针对被聚合的逻辑端口工作。 配置目标地址。 将PING的值设置一个较大的值。 关闭交换机接口的二层特性。 由于目前仅配置SW1,而SW2并没有配置。所以此处系统提示,远程主机没有激活PAgP聚合。 当配置完SW2交换机后,系统提示聚合链路已经处于UP状态。 RU的状态的其中,R指出目前聚合链路为第三层的聚合。 |
http://blog.chinaunix.net/u3/99768/showart_1999615.html