Difference between revisions of "Spanning Tree Default Behaviour"
(Created page with "=Topology= File:spanning-tree-default-behaviour-topology.png =Learning Objectives= *Understand the purpose of STP. *Observe the default behaviour of STP. *Be able to dete...") |
|||
Line 145: | Line 145: | ||
*Power down your existing root switch or shut down all the ports on your current root switch. | *Power down your existing root switch or shut down all the ports on your current root switch. | ||
*Compare your calculated topology with the observed behaviour of the physical switches. | *Compare your calculated topology with the observed behaviour of the physical switches. | ||
− | |||
− |
Latest revision as of 13:57, 10 March 2020
Contents
Topology
Learning Objectives
- Understand the purpose of STP.
- Observe the default behaviour of STP.
- Be able to determine the loop-free topology of a network given a topology and bridge ID information.
Background
Six switches have just been installed in a classic redundant three-layer hierarchy. The access layer is depicted as layer 2 switches and the core and distribution as layer 3 switches (routers) as this is the most common practice. However, in this lab we are not enabling routing (layer 3) on the distribution or core switches and you can consider the entire network as layer 2 only. There are many redundant links between the layers. Because of the possibility of bridging loops, spanning tree logically removes any redundant links. In this lab, you will observe what spanning tree does and why.
Preparation
Download the EVE topology and print diagram
Download the following EVE topology file to your local computer. Media:EVESpanningTreeDefaultBehaviourTopology.zip
Large topology diagram for printing. Media:3-layer-topology.pdf Your instructor may provide this.
Starting the EVE environment
- Launch VMware on your local computer.
- Start the EVE-NG virtual machine using VMware.
- Start Firefox and browse to the IP address shown in the EVE virtual machine server console/
- Login to EVE with the username:admin and the password:eve.
- Select import and navigate to the topology file you downloaded (probably in the Downloads folder).
- Open the lab topology.
- Start all devices from the "More Actions" menu on the left.
Configure basic switch parameters
- Configure the six switches as shown in the diagram with an appropriate hostname. We will also disable the protocol VTP. This step forces VLAN information to be stored in the startup-configuration file, allowing EVE to export it if you wish to take a copy of your lab for later work.
For example on Access1:
Switch> enable Switch# configure terminal Switch(config)# hostname Access1 Switch(config)# vtp mode transparent
Note: After the switches are powered up spanning tree is initiated, the switch detects the redundant links. By default, spanning tree runs on every port. When a new link becomes active, the port goes through the IEEE 802.1D spanning tree listening and learning states before transitioning to the forwarding state. During this period, the switch discovers if it is connected to another switch or an end-user device. One of the switches is elected as the root bridge for the tree. Then each switch independently determines which links to keep active and which links to logically remove from the spanning tree (block) if multiple links exist.
- What type of frame does STP use to communicate with other switches?
______________________________________________________________
The results depicted in this lab would vary between individuals in the class if real switches with random MAC were used. The default Spanning tree behaviour and the resulting loop-free topology is based on the MAC addresses of the switches.
Display default spanning tree information for all switches
- Verify IEEE 802.1D STP with the show spanning-tree command on Distribution1.
Distribution1#show spanning-tree VLAN0001 Spanning tree enabled protocol ieee Root ID Priority 32769 Address 5000.0001.0000 Cost 4 Port 1 (GigabitEthernet0/0) Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Bridge ID Priority 32769 (priority 32768 sys-id-ext 1) Address 5000.0005.0000 Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Aging Time 300 sec Interface Role Sts Cost Prio.Nbr Type ------------------- ---- --- --------- -------- -------------------------------- Gi0/0 Root FWD 4 128.1 P2p Gi0/1 Altn BLK 4 128.2 P2p Gi0/2 Desg FWD 4 128.3 P2p Gi0/3 Desg FWD 4 128.4 P2p Gi1/0 Desg FWD 4 128.5 P2p Gi1/1 Desg FWD 4 128.6 P2p Gi1/2 Desg FWD 4 128.7 P2p Interface Role Sts Cost Prio.Nbr Type ------------------- ---- --- --------- -------- -------------------------------- Gi1/3 Desg FWD 4 128.8 P2p Distribution1#
Notice that some of the ports are blocking BLK. These ports will not pass regular frames or broadcasts and thus break any switching loops that are present.
It is important to note that a blocked port can receive BPDUs. In fact, it is the BPDUs that keep a port in the blocked state.
- If you have a paper copy of the topology, mark the blocked ports for the Distribution1 switch.
- Repeat the "show spanning-tree" command on each of the switches and record the blocked ports on your topology diagram.
- Label the root-bridge (root switch) in your topology.
Once you have labelled your diagram, verify that the resulting topology is in fact loop free. It is worth taking the time to work through the spanning-tree decision process to see if you can explain how the blocked ports are determined.
After reviewing the spanning tree output, Make sure you are able to answer the following questions.
- Which switch is the root of the spanning tree?
______________________________________________________________________
- How can the root switch be identified?
_______________________________________________________________________
- Why was that switch selected as the root?
_______________________________________________________________________
- What caused one port to be in blocking state over another?
Another useful STP command is show spanning-tree root. This command displays a summary listing of the VLANs defined, the Root (bridge) ID for each one, the Root Cost and the Root Port that the switch uses to reach the root bridge. In this lab the only active VLAN is default VLAN 1. Issue the show spanning-tree root command on each of your switches.
Access1#show spanning-tree root Root Hello Max Fwd Vlan Root ID Cost Time Age Dly Root Port ---------------- -------------------- --------- ----- --- --- ------------ VLAN0001 32769 5000.0001.0000 0 2 20 15 Access1#
Summary
In this lab, the default operation of IEEE 802.1D spanning tree was observed. Since no bridge priorities were specified, the switch with the lowest MAC address was elected as the root. The link providing the lowest root path cost was chosen as the active link. If costs were equal, the tie was broken first by the lowest sender BID of the BPDU, then by the lowest sending port priority and last by the lowest sending port number. In the next lab, the default STP behavior will be modified so that spanning tree works according to specifications.
Exercise
This is important - There is invariably a final exam question that will require you to identify the spanning tree port states for a topology given only the MAC addresses and link speeds.
Given the initial topology in this lab, and the actual MAC addresses present. Determine how your Spanning Tree topology would look if you completely removed the current root switch.
- Start by determining the new root bridge based on the MAC address.
- Record the spanning tree costs for each link.
- Determine the root ports based on cost.
- Tie breaker is the Lowest sender BID or if the BIDs are equal, the Lowest port ID.
Check your calculations
- Power down your existing root switch or shut down all the ports on your current root switch.
- Compare your calculated topology with the observed behaviour of the physical switches.