The purpose of this lab is to introduce the Spanning Tree Protocol and how to configure priorities of core, distribution and access switches appropriately.
This lab is a continuation from the earlier set up exercise, and the lab layout is identical:
Before we begin configuring spanning tree we will take a look at the current situation on the network.
Run the following commands and pay close attention to the output:
show spanning-tree brief
show spanning-tree blockedports
show spanning-tree
What is the priority on each switch?
Which switch is the root? Why?
Which ports are blocked? Why?
Make a note of the answers to the above questions, as we will compare those with the answers once we do the next step. If the instructors ask you, please write them up on the classroom whiteboard too.
Configure the STP priorities explicitly for each switch, according to the plan in Appendix A.
For example, on dist1-b1.campus1:
dist1-b1.campus1(config)#spanning-tree vlan 1 priority 12288
Verify:
show spanning-tree brief
Why is it so important to set the priorities explicitly?
Check the output of the spanning-tree status command. What is happening on edge1-bY.campusX? Here is an example taken from one of the past Campus Network Design Workshops (your interface numbers and MAC addresses might be different):
edge1-b1.campus6#show spanning-tree brief
VLAN1
Spanning tree enabled protocol ieee
Root ID Priority 0
Address c42b.5c43.0000
Cost 38
Port 55 (FastEthernet1/14)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority 24576
Address c42d.5c43.0000
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 300
Interface Designated
Name Port ID Prio Cost Sts Cost Bridge ID Port ID
-------------------- ------- ---- ----- --- ----- -------------------- -------
FastEthernet1/14 128.55 128 19 FWD 19 12288 c42c.5c43.0000 128.53
FastEthernet1/15 128.56 128 19 BLK 19 12288 c42c.5c43.0000 128.54
There are actually two links from edge1 to dist1 in each Building. We will use these two links later on in this lab exercise.
Notice how one link is in Forwarding Mode, and the other link is in Blocking Mode. This is so we do not have a loop between the edge1 and dist1 switches. If spanning tree is turned off between these two switches, we end up with a loop, traffic would not be forwarded, and the CPU load on the switches would go to 100%.
We could disable spanning tree to see what effect it has.
WARNING: Disabling spanning tree has a significant effect on the Dynamips server's CPU load. For this reason, we cannot safely demonstrate this in our virtual environment.
START OF DEMO ONLY SECTION
We'll try to set up a demo with real hardware in class - here's what we'll try on the test setup.
On a network of real switches we could type:
no spanning-tree vlan 1
Can the switches ping each other reliably now? Why?
Watch the port counters on the inter-switch links.
show interface stats
What happens with the counters of the connected interfaces? What is going on?
Very quickly enable STP again on all switches:
spanning-tree vlan 1
This is known as a Broadcast Storm
WARNING: Don't try this on a production network!
END OF DEMO ONLY SECTION
Disconnect core1.campusX from the rest of the network:
interface range FastEthernet 1/1 - 2
shutdown
While it is cut off from the rest, verify spanning tree status on the other switches.
Which switch is the root now?
Verify port roles and status. Verify connectivity with ping.
Reconnect core1.campusX:
interface range FastEthernet 1/1 - 2
no shutdown
What happens to the spanning tree when the switch comes back online?
Refer to this priority table for the appropriate priorities on each switch.
| Priority | Description | Notes |
|---|---|---|
| 0 | Core Switch | For the core switch (core1.campusX) |
| 4096 | Redundant Core Switch | For cases where we have a second core switch (building redundancy into the core) |
| 8192 | Reserved | |
| 12288 | Building Distribution | (dist1-b1.campusX; dist1-b2.campusX) |
| 16384 | Redundant Building Distribution | For cases where we have a redundant building distribution switch |
| 20480 | Secondary Backbone | This is for building complexes, where there are separate building (secondary) backbones that terminate at the complex backbone. |
| 24576 | Access Switches | This is the normal edge-device priority (edge1-b1.campusX; edge2-b1.campusX; edge1-b2.campusX; edge2-b2.campusX) |
| 28672 | Access Switches | Used for access switches that are daisy-chained from another access switch. We're using this terminology instead of "aggregation switch" because it's hard to define when a switch stops being an access switch and becomes an aggregation switch. |
| 32768 | Default | No managed network devices should have this priority. |