Open In App

Spanning Tree Protocol in CCNA

Spanning Tree Protocol (STP) is a protocol that prevents Layer 2 loops or Bridging loops by computing a tree structure of nodes in a network. It also prevents MAC Flapping  (an event that occurs when a switch receives packets on different interfaces with the same source MAC address)

Spanning Tree Communication:

Bridge ID is an 8-byte unique identity of each switch in an STP topology. It consists of two things: –



  1. Bridge Priority: ranges from 0 to 65535 (default is 32768) + VLAN-id.
  2. Base MAC Address:  hard coded and unique for every switch.

In a Spanning Tree Topology computed by STP, there exists only one Root Bridge for the entire STP topology and the rest of the switches are Non-Root Bridges.

Root Bridge Election:

Manually configuring the priority of a switch: –



R1(config)#spanning-tree vlan <vlan-id> priority <priority-value>

 

 

Type of Ports in STP:

  1. Root Port (RP): These are the ports that are closest to the Root Bridge in terms of Cost and are responsible for receiving the STP’s control-plane Traffic.
    • Every Non-Root Bridge has only one Root Port and other ports can be either Designated Ports or Alternate Ports (based on the election).
  2. Designated Port (DP): It is responsible for forwarding traffic. 
    • Every port of the Root Bridge is a Designated Port.
  3. Alternate Port (Alt)/Blocked Port: It is a backup port that is in a Blocking State.
    • It comes up only if the current Root Port goes down.

Port Role Election:

After the Root Bridge is elected, the Port Role election takes place on every switch (non-root bridge), based on the following criteria in order: –

        Port Speed             Cost (802.1D – 1998)    
          10 Mbps                 100 
         100 Mbps                  19
          1 Gbps                   4
         10 Gbps                    2

Port Role Election Process:

 

 

Article Tags :