Self Study Guide: Spanning Tree Protocol

by | May 18, 2017 | CCIE, CCNA, CCNP, Self Study Guides | 0 comments

Spanning Tree protocol is one of the key topics in switching. It is mainly used to prevent switching loops in a network. A switching loop can occur in a lot of scenarios in switches. Consider a few switches connected with each other in full mesh order with one or two cables like this,

Spanning Tree Protocol

If every port is in the forwarding state, each switch will keep forwarding traffic to other switches which could cause a loop. Because of a switching loop, a few problems can occur, like

  1. Inconsistency of MAC-Table
  2. Broadcast Storm
  3. Data Loss
  4. High Bandwidth utilization and much more.

So, to prevent these problems, STP will block some ports to avoid the loop. Blocking ports cannot send the traffic but they can be utilized if the main port is down.

Here, to understand STP, we are listing some terminology of Spanning tree protocol.

  1. STP:

Spanning tree protocol, IEEE standard 802.1D (Original) is a protocol that is mainly designed to avoid switching loops in the network. It was originally designed for bridges but later on, it was implemented on Switches as well.

  1. BPDU:

Bridge Protocol Data Unit, are forwarded out of all ports in every two seconds to build the topology database. Configuration and Topology change notification are two types.

  1. Root Bridge:

It works as a central reference point of STP topology. Mainly responsible for sending BPDU to downstream switches. It is also referred as Root Switch.

  1. Root Port:

A port Role that is assigned to a port on Non-Root Bridge. Lowest Root Path Cost to get to the root bridge is considered as Root Port.

  1. Designated Port:

Responsible for forwarding BPDUs and Frames to the segment. It can never be in blocking state.

  1. Alternate Port:

An alternate path to reach the root bridge. It will be used only when the main path goes down. BPDUs are received on blocking ports.

  1. CST:

Common Spanning Tree, utilizes a single instance for all the VLANs. It is also referred as Mono spanning tree. Load Balancing according to VLANs is not possible.

  1. PVST:

Per VLAN Spanning Tree separates STP instance for each VLANs, improving flexibility and Performance but leaving with too many instances of STP. Not compatible with CST.

  1. PVST+:

An enhanced version that is compatible with bot CST and PVST and supports both ISL and 802.1q encapsulation. It defaults on many Cisco Platforms.

  1. RSTP:

Rapid STP is enhanced and much faster version of STP. Discarding state is introduced here.

  1. MST:

Multiple Spanning Tree maps multiple instances into a single instance of STP reducing CPU Utilization and the number of Instances of STP on a switch.

  1. Blocking State:

A state of the port where it cannot forward a frame or learn MAC. Still, it receives BPDU. An initial state of all the ports.

  1. Listening State:

Sends and listens BPDU but cannot forward frames or learn MAC. 15 sec is the time that a port has to wait before going to next state

  1. Learning State:

Continues sending and listening BPDUs plus, it will start learning MAC addresses. Still, it cannot forward frames. Here too, 15 sec is the time that a port has to wait before going to next state.

  1. Forwarding State:

Sends, Receives BPDU, Learn MAC address and Forwards Frames. Root and Designated ports will jump to this state eventually.

  1. Forward Delay Timer:

It determines how long a port must wait before going into next state. It is 15 sec by default.

  1. Max Age Timer:

How long will a switch retain BPDU info from the neighbor before discarding it? It is 20 sec by default.

  1. STP Diameter:

It is the length of the topology, measured in the number of switches including the Root Bridge. By default it is 7 and maximum is 7.

  1. Spanning Tree Portfast:

A feature when enabled, a switch port will jump directly from blocking to the forwarding state without going into listening and Learning State.

  1. Spanning Tree Uplinkfast:

Mainly used for faster convergence in case if Root Port goes down. When enabled, blocking port will directly jump to forwarding state if Root Port goes down.

  1. Root Guard:

When enabled on a port, it will put the port in a root-inconsistent state if any superior BPDU is received. Port still receives BPDU.

  1. BPDU Guard:

BPDU Guard will place a port in an err-disable state if a BPDU is received, regardless if the BPDU is superior or inferior. It is generally run with Portfast command.

  1. BPDU Filter:

It will stop sending and receiving (depending on how it is configured) of BPDU on certain interfaces.

  1. UDLD:

Unidirectional Link Detection: It is mainly used to check unidirectional links in the network, mainly in fiber media. UDLD sends out ID frames on a port and waits for the remote switch to respond with its own ID frame. If the remote switch does not respond, UDLD assumes the port has a unidirectional fault.

  1. Loop Guard:

It takes action against not receiving BPDU on blocking ports. Not receiving BDPU on blocking port can cause the switch to thinking that it is the Root Bridge and incorrectly transitioning root port into designated port, causing a loop

Recommended Read:


I-Medita is an ISO 9001:2015 certified Professional Training Company. I-Medita is India's Most Trusted Networking Training Company. We help in providing industry oriented skill training to networking enthusiasts and professionals to kick-start their career in Networking domains. Our efforts are to keep momentum with the Industry technological demands and diversifying universe of knowledge.
Register for Free Demo Session