STP-Spanning Tree Protocol- Switching Techniques

 STP- Spanning tree Protocol is one of the most important topic in the Routing and Switching domain. So now question is why STP is so much important, where we are using the STP.


Lets start with the basics, STP is generally used avoiding the loop in the Switched network, Switched network means the LAN- Local Area Network. So it is clear if STP is there in the Switched or LAN network then looping is not possible.

Audience # Cisco Network Engineers, CCNA R&S Engineers, TAC/NOC Engineers and Systems Engineers

Before you trying to understand the concept of STP, one must understand the selection criteria of the root bridge in the network. When i am saying the network make sure you understand it always be Local area network in this article.

Root Bridge Selection 

Case-1
Let us suppose we have 3 switches in the network which their different MAC address. So when you are talking about the selection procedure first of all check the priority set on the switches, If there is priority set on the switches then the high priority switch will be the Root Bridge and all east-west, North-south switched traffic will be passed from the root bridge.

Case-2
Now, if there is no Priority on the switches then ? so all switches will send the BPDU configuration message to each other and check the MAC address of all the switches in the database, then they recognise that which so ever switch is lower MAC address will be chosen as " Root Bridge "

So now by these two above cases, you may understand the criteria of the " Selection of the Root Bridge". Once Root Bridge selected the STP-Spanning tree Protocol comes in to picture.

Ports on the Root Bridge will always be " DP- Designated Port "and the other switch will be connected by this DP port will always have RP port.


Fig 1.1 - STP Topology

Above is the general STP topology and its for general understanding as i can explain you with the example which can not explain in the above picture.

So if you root bridge, lets suppose A is connected to other switch B then the port at switch A will be DP port and the port at Switch B will be RP port ( Root Port ). The reason why Switch B have the RP Port because it is the principle that which so ever switch have the lower MAC address and connected to the higher MAC address switch the port will be RP at High Mac address side and DP at Lower MAC side.

But we have another Switch C as well in the picture, so if we are connected Switch B and Switch C with each other then which one is DP and which one is RP port. The same condition applies, If the MAC address of the Switch B is less than the MAC of the Switch C then Port of Switch B will be DP ( that connected to Switch C) and the port of Switch C will be in Blocked state ( now thats the big Gochaa) , Why that port is in the block state. The reason is STP existence. Let me explain this one aswell

We have 3 Switches, Switch A, Switch B and Switch C, Switch A connected to Switch B and Switch C, so both these ports are DP Ports, Switch B is Connected to Switch A and Switch C, So the Port towards switch A will be RP port and towards Switch C will be DP ( due to lower MAC than Switch C), Switch C connected to Switch A and Switch B, so the port towards Switch A will be RP and Port towards switch B will be at blocked state, it will not be in blocked state, then Switch B will get the same user traffic from Switch A as well as from Switch B and it will causes Loops in the network, similarly the same user traffic will be there at Switch B from Switch A and Switch C. so one port should be blocked to avoid looping and that is decided by STP protocol on the basis of MAC addresses.

So now you understand about STP, root bridge selection criteria and DP, RP Ports and traffic flow in the switched network. In our next session we will talk about the BPDU messages and where these messages generally used in the network and also talked about the advance versions of STP called RSTP and features in the RSTP protocol.