Introduction to the Spanning Tree Protocol

  • By Gandhar Bodas
  • December 1, 2023
  • CCNA
Introduction to the Spanning Tree Protocol

Introduction to the Spanning Tree Protocol

One key player in achieving network reliability, especially in the context of Ethernet networks, is the Spanning Tree Protocol (STP). Developed to tackle the challenges posed by network loops, STP plays a crucial role in preventing broadcast storms and ensuring seamless communication. In this exploration, we’ll unravel the Introduction to the Spanning Tree Protocol, understanding its purpose, operation, and significance in modern networking. Explore Interview Questions on Spanning Tree Protocol

 

For Free, Demo classes Call: 020-71173071

Registration Link: Click Here!

1) STP is a layer 2 protocol that runs on bridges and switches.

2) The main purpose of STP is to ensure that it does not create loops when having redundant paths in the network.

3) STP was developed to prevent the broadcast storms caused by switching loops.

4) It is defined in IEEE 802.1D.

5) Switches running STP will build a map or topology of the entire switching network.

6) STP will identify if there are any loops, and then disable or block as many ports as necessary to eliminate all loops in the topology.

7) A blocked port can be re-activated if another port goes down.

8) However, because ports are blocked to eliminate loops, STP does not support load balancing unless an Ether Channel is used

9) STP switches exchanged Bridge Protocol Data Units (BPDU) to build the topology database.

10) BPDU are forwarded out all ports every two seconds, to a dedicated MAC multicast address of 0810.c200.0000

STP Concepts

1) Electing an STP Root Bridge =

  1. a) The first step in STP convergence process is electing a Root Bridge, which is the central reference point for the STP topology.
  2. b) A Root Bridge is elected based on its Bridge ID comprised of two components in the original 802.1D standards.
  3. c) The default priority is 32,768 and the lowest priority wins.
  4. d) If there is a tie in priority, the lowest MAC address is used as the tie- breaker.

Consider the following example:

Introduction to the Spanning Tree Protocol

 

  1. e) Switches exchange BPDU to perform the election process, and the lowest Bridge ID determines the Root Bridge.
  2. f) By default a switch will always believe it is the Root Bridge, until it receives a BPDU from a switch with a lower Bridge ID.
  3. g) This is referred to as a Superior BPDU.
  4. e) The election process is continuous if a new switch with the lowest Bridge ID is added to the topology, it will be elected as the Root Bridge.

For Free, Demo classes Call: 020-71173071

Registration Link: CCNA Training in Pune!

 

2) Identifying Root Ports = 

  1. a) The second step in the STP convergence process is to identify root ports.
  2. b) The root port of each switch has the lowest root path cost to get to the Root Bridge.
  3. c) Each switch can only have 1 root port.
  4. d) The Root Bridge cannot have a root port, as the purpose of a root port is to point to the Root Bridge.
  5. e) Path cost is a cumulative cost to the Root Bridge, based on the bandwidth of the links.
  6. f) The higher the bandwidth, the lower the path cost.

Introduction to the Spanning Tree Protocol

 

Note: A lower cost is preferred.

Consider the following example:

Introduction to the Spanning Tree Protocol

 

3) Identifying Designated Ports = 

  1. a) The 3rd step of STP convergence is to identify designated ports.
  2. b) A single designated port is identified for each network segment.
  3. c) This port is responsible for forwarding BPDU and frames to that segment
  4. d) If two ports are eligible to become the designated port, then there is a loop
  5. e) One of the ports will be placed in a blocking state to eliminate the loop.
  6. f) Similar to the root port, the designated port is determined by the lowest cumulative path cost leading the Root Bridge.
  7. g) A designated port will never be placed in a blocking state, unless there is a change to the switching topology and a more preferred designated port is elected.

Note: A port can never be both a Designated Port and a Root Port.

Consider the following example:

Introduction to the Spanning Tree Protocol

 

For Free, Demo classes Call: 020-71173071

Registration Link: Click Here!

 

4) Port ID = 

  1. a) When electing root and designated ports, it is possible to have a tie in both path cost and Bridge ID.

Consider the following example:

Introduction to the Spanning Tree Protocol

 

  1. b) The bandwidth of both links is equal, thus both ports on Switches have an equal path cost to the Root Bridge.
  2. c) Normally, the lowest Bridge ID is used as the tiebreaker, but that is not possible in this circumstance.
  3. d) Port ID is used as the final tiebreaker, and consists of 2 components:

4- Bit port priority

12-bit port number, derived from the physical port number

  1. e) By default, the port priority of an interface is 128, and a lower priority is preferred.
  2. f) If there is a tie in priority, the lowest port number is preferred

 

Versions of STP

1) Common Spanning Tree (CSTP) = CSTP utilizes a single STP

instance for all VLANs and is sometimes referred to as mono

spanning tree. All CSTP BPDUs are sent Ove the native VLAN on a

trunk port, and thus are untagged.

2) Per VLAN Spanning Tree (PVSTP) = PVSTP employs a separate STP instance for each VLAN, improving flexibility and performance. PVSTP requires trunk ports to use ISL encapsulation.

3) Per VLAN Spanning Tree Plus (PVSTP +) = The Enhanced /

Advanced PVSTP + is compatible with both CSTP and PVSTP, and

supports both ISL and 802.1Q encapsulation. PVSTP + is the default

mode on many Cisco platforms.

4) Rapid Spanning Tree Protocol (RSTP) = To speed up the data.

 

STP Port States

Introduction to the Spanning Tree Protocol

 

1) Blocking = 

  1. a) A blocking port will not forward frames or learn MAC addresses.
  2. b) A blocking port will still listen for BPDUs from other switches, to learn about changes to the switching topology.

2) Listening State = 

  1. a) The switch must believe that the port will not be shut down to

eliminate a loop.

  1. b) In other words, the port may become a root or designated port.
  2. c) A listening port will not forward frames or learn MAC

Addresses.

  1. d) A listening port will send and listen for BPDU to participate in the election of the Root Bridge, Root ports, and Designated

Ports.

  1. e) If a listening port is not elected as a Root or a Designated Port, it will transition back to a blocking state.

 

For Free, Demo classes Call: 020-71173071

Registration Link: Click Here!

 

3) Listening Port = 

  1. a) A listening port is elected as a root or designated port, it will transition to a learning state.
  2. b) A port must wait a brief period of time, referred to as the forward delay before transitioning from listening to a learning

state.

  1. c) A learning port will continue to send and listen for BPDUs.
  2. d) A learning port will begin to add MAC addresses to the CAM

Table.

  1. e) However, a learning port cannot forward frames quite yet.

4) Forwarding State = 

  1. a) A port must wait for another forward delay before transitioning

from learning to forwarding.

  1. b) A forwarding port is fully functional – it will send and listen for BPDUs, learn MAC addresses, and forward frames.
  2. c) Root and Designated ports will eventually transition to a

forwarding state.

Upgrade Your Networking Knowledge From SevenMentor Institute

Author:-

Gandhar Bodas

Call the Trainer and Book your free demo Class For CCNA Call now!!!
| SevenMentor Pvt Ltd.

© Copyright 2021 | SevenMentor Pvt Ltd.

Submit Comment

Your email address will not be published. Required fields are marked *

*
*