Lab Objective:
Learn how to spot a switching loop on your layer 2 networks.
Lab Purpose:
My first consulting customer called me in a panic. Their multimillion-dollar network kept crashing every few minutes, even after a complete reboot. I immediately suspected a switching (spanning tree) loop. Most network engineers have never seen one and don’t know how to fix it, usually because the Spanning Tree Protocol works so well.
WARNING – Never try this lab on a production network!
Lab Tool:
Packet Tracer
Lab Topology:
Please use the following topology to complete this lab exercise:

Lab Walkthrough:
Task 1:
Connect three switches and one PC onto the canvas. Connect them up as per the diagram. Add the IP address to the PC and default gateway of 192.168.1.2 (which doesn’t exist on the network).

Task 2:
Name the switches and then turn off STP in order to create a switching loop. Here is how to do it on Switch0. Do the same on the other two switches, but name them Switch1 and Switch2.
Switch>en
Switch#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#hostname Sw0
Sw0(config)#interface range f0/1-3
Sw0(config-if-range)#no spanning-tree vlan 1
Sw0(config)#end
Sw0#
Task 3:
Set Packet Tracer to simulation mode to see packets moving across the network. Set ‘Edit Filters’ to show only ARP and ICMP. (Please ensure you have watched all of our training videos at www.101labs.net/resources if you are stuck on this step.)
Click on ‘Show All/None’ and then tick the two you want.
Task 4:
From the PC, ping host 192.168.1.2. You can press the play button in the simulation mode. Keep pressing play and watch the packet travel endlessly around the network, never resolving the ARP request for the host.
Task 5:
The packet capture window quickly fills with ARP requests. This will slow your network to a crawl and eventually lead to a crash.
Task 6:
You can fix this particular issue by reenabling STP on the switches for VLAN 1. Here is how to do it on Switch0. Repeat the steps on the other switches.
Sw0#conf t
Sw0(config)#interface range f0/1-3
Sw0(config-if-range)#spanning-tree vlan 1
Sw0(config-if-range)#end
Task 7:
You can redo the test, however, from the canvas; you can see that one of the switchports has been shut down by STP, and so will not forward traffic. You may well have a different port to mine shut down. This time around, the ARP lookup will fail, and ICMP will inform the PC of the timeout. Only five ping packets will be sent.
Note:
STP loops are very serious, so make sure you study this protocol in your study guide and in the later lab we have on it.





