实验四 端口聚合

1. 网络拓扑

端口聚合是在端口下配置吗(端口聚合2)(1)

2. 实验目的

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

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

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

3. 实验步骤

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

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

5) 在SW1和SW2上配置如下: SW1(config)#interface range fastEthernet 1/0/23 – 24 SW1(config-if-range)#switchport SW1(config-if-range)#channel-protocol pagp SW1(config-if-range)#channel-group 1 mode desirable

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

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

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

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

SW1#show interfaces fastEthernet 1/0/23 etherchannel Port state = Up Mstr In-Bndl Channel group = 1 Mode = Desirable-Sl Gcchange = 0 Port-channel = Po1 GC = 0x00010001 Pseudo port-channel = Po1 Port index = 0 Load = 0x00 Protocol = PAgP 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: 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: 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 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) SW1#

11) 查看生成树信息

SW1#show spanning-tree ……… Interface Role Sts Cost Prio.Nbr Type ---------------- ---- --- --------- -------- -------------------------------- Po1 Root FWD 12 128.616 P2p 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

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

SW2#ping Protocol [ip]: Target IP address: 192.168.1.1 Repeat count [5]: 1000000 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数据包不会出现中断,说明链路聚合能够有效的避免单链路的拓扑不稳定,同时解决了冗余链路情况下,由于生成树原因而不能充分利用链路带宽和实现负载分担的问题。

,