STP - spanning tree protocol explained with example

The spanning tree protocol (STP) is a network protocol that builds a loop free logical topology for ethernet network. The basic function of STP is to prevent bridge loops and the broadcast rediation that results from them. Spanning tree also allows a network design to include backup links providing fault tolerance if an active link fails.

As the name suggests, stp create a spanning tree that characterizes the relationship of nodes within a network of connected layer - 2 bridges, and disable those links that are not part of the spanning tree, leaving a single active path between any two network nodes. STP is based on an algorithm that was invented by radia perlman while she was working for digital equipment corporation.

In 2001, the IEEE introduced rapid spanning tree protocol (rstp) as 802.1 w. Rstp provide significant faster recovery in response to network changes or failures, introducing new convergence behaviour and bridge port roles to do this. Rstp was designed to be backwards compatible with standard stp.

STP was originally standardized as IEEE 802.1d but the functionality of spanning tree (802.1d), rapid spanning tree (802.1w), and multiple spanning tree (802.1s) has since been incorporated into IEEE 802.1q-2014.

(Spanning tree protocol)

STP protocol is useful for providing network redundancy. It provides broadcast storm control mac-address filtration multiple frame transmitters.

Bridging loops are only link between switches STP shutdown the extra link and manually up when the link is required.

STP stops the loops when we have multiple links between switches.

STP stops avoiding broadcast storm multiple frame copies and database instantly.

STP is open standard protocol. STP is enable by default on each cisco switch.

How STP work

Selecting the root bridge

The bridge with the best bridge id between the root bridges. Bridge id=priority + mac address of switch. Every LAN will have only root bridge and all the remaining the switches as non-root bridge

Selecting the root port

Shortest path the root bridge. Every non root bridge loops the best way to go root bridge it depends on speed and physical root. For every non-root bridge is only one root port. STP port cost.

Selecting the designated port and non-designated port

This is the function on the lowest speed, lowest switch id and lowest physical port in blocking port.

BPDU (bridge protocol data unit)

Bridge protocol unit is used to send information between switches, bridge to establish network topology if topology change BPDU are send information about the topology to all the network.

BPDU are transmitted in one direction from the root bridge. Each network device send information to the STP and BPDU transmit this frame to all over the topology. STP switch use the learning listing method which is use approximately 15 sec.

Lab of STP

In the production network there are number of switches work and we use the STP protocol then some time lower configuration switch become the root, so because of this we need to manually defined the root.

How to verify STP

Switch# sh spanning-tree
Switch# sh spanning-root
Switch# sh spanning-tree vlan 10
Switch# sh spanning-tree

We will ableto check that whichis the root switch, in this switch l as a root then type the following command.

Switch (config)#spannig-tree vlan l priority 0
Switch# sh spanning-tree


You can also use following command

Switch (config)#spannig-tree vlan l root primary

Control plane and data plane

What is inbound and outbound?

  1. Inbound:- if we access the router using the console port then it is called the inbound.
  2. Outbound:- if we access the switch or router using the telnet or SSH.

Control plane

Make decision about where traffic is send. The control panel function include the system configuration. Management and exchange of routing table information.

The route controller exchange the topology information with other routers and console constricts arouting table based on routing protocol e.g. RIP, ospf, bgp.

Control plane packet are processed by the router to update the routing table information.

Data plane

Also known as forwarding plane. Forwarding traffic to the next hop along the path to the selected destination network according to control plane logic.

The router switch use what the control panel built to dispose of incoming and outgoing frames and packet.


Popular posts from this blog

Introduction to router of What is router?

What is Telnet with example by blog

Routing protocols and concepts ccna exploration companion guide