Powered by Blogger.

CCNA- STP (Spanning Tree Protocol) : Part 1


Today we are going to arm ourselves with an amazing protocol, STP! STP (Spanning tree Protocol) is an amazing protocol to create a loop free topology in a redundant bridge network. STP was created by Dr Radia Perlman of Sun Microsystems for a loop free bridge (“bridge” can be replaced with switch) network.
Yes redundancy is one of the important parts of a network design. In a simple Campus Area Network, there is a lot of redundancy at the Distribution as well as Core layer of the network. The redundant paths are necessary for the fast convergence and stable operation of a good corporate network.


Before we began to discuss STP in detail, it’s worth mentioning that it’s based on IEEE 802.1d standard and by default enable on each CISCO switch. You can’t imagine the catastrophe it can lead to if you disable STP on a live production network, so it's strongly recommended not to disable it in any case, yes you can if you want to play with STP or want to create broadcast storms to blow your switch little brain J

How STP Works:





Let’s suppose we have above redundant network. In order to maintain network continuity, we have created redundant paths in this network. Suppose if there was no STP running, Switch 0 will send its data ( CAM table etc) to Switch 1 and Switch 1 will send its data back to Switch 0, this loop will continue forever until the switches get mad J So STP is taking care of the network by blocking ports/redundant paths, which stops this loop from escalation. In the above Figure1.1, Switch 1 has blocked its Fa0/2 port to avoid this network looping; this was possible because of the magic of STP. It will keep the port in block stat until its needed, in case any other port goes down etc.


Going deep, how STP really works:


One of the most puzzling part it is. STP uses probes or beacons (technically known as BPDUs, bridge protocol data units) to check looping on the network. These BPDUs can be considered as echoes request of the switch to its neighbor switch ports, if the sending switch receives this echo back, it’s a strong indication for loop, STP comes into action and it blocks the port according to its algorithm to prevent the loop. These BPDUs are also used to elect the Root Bridge (we will discuss it further) and best path from each bridge to reach the RB (Root Bridge) and then block all useless ports.


In order to provide this path redundancy, and to avoid a loop condition, spanning tree algorithm defines a tree like structure that spans all the switches. Spanning Tree algorithm converts the redundant data paths into a standby (blocked or non-designated) state and other paths in a forwarding state (designated state or in other words root ports). If a link in designated state becomes unavailable, Spanning tree algorithm reconfigures the network and reroutes data paths through the activation of the appropriate standby path (i.e. standby ports are converted into designated or forwarding ports). So far from this discussion we have concluded that STP algorithm convert the ports into following state: 
  • Designated/root ports 
  • Non-Designated/Blocked Ports 
  • Forwarding ports


0 comments:

Post a Comment