The term “loop-free topology” refers to the configuration of the components that make up a computer network. The spanning tree protocol is a sort of communication protocol that serves the purpose of constructing a loop-free topology.

The STP protocol is typically utilized for layer-2 bridges and switches. Additionally, it offers a backup link for the network system in the event that the primary link becomes inoperable. The data is transmitted by the Layer 2 devices in the form of frames.

The spanning tree is made up of several different parts, one of which is the root port of each bridge. The ports that are chosen by the spanning tree are the ports that have the best chance of successfully connecting to the root bridge, which is also referred to as the target port.

This indicates that each switch and bridge only has a single root port available for use. In the event that any other switch does not have any root port, it will choose one port to be designated while the remaining ports will be non-designated.

The specified port will be treated as one of the ports in the forwarding state, while the others will be deemed to be in the blocking state.

Only one of a node’s ports is made active by STP; the others are rendered inoperable. This indicates that it is only possible for there to be a single active path for transmission between the two nodes.

The port that is chosen by the STP is referred to as the root port, and it is responsible for sending data to the root bridge. The data sent by the various bridges is brought to the root bridge for processing.

The route to the destination is decided based on the cost of the port, the priority of the port, and the switch ID. It will become the path to the destination if the cost of the port and the switch ID is the lowest among the available options.

Steps of choosing the designated port

The steps of choosing the designated port are mentioned below:

  1. Choose the one that has the cheapest route cost among the switches: It is necessary for us to choose the switch that will result in the lowest path cost.
  1. Choose the switch’s designated port that will incur the smallest amount of expense: To get to the destination, there are two different ports to choose from. We have to choose one port to be the designated port since it has the lowest cost, and we have to choose another port to be the non-designated port.


Choose the appropriate port on the switch based on the ID of the bridge: In the event that the lowest cost on two switches is identical, it chooses the assigned port by referring to the Bridge ID. The selected port is in a functioning state that allows for forwarding. It puts the data in motion.

  1. Indicate that the other port is to be used as the Non-designated port: The root port of the other switches is marked as NDP, which stands for “non-designated port,” and it is in a state that does not allow for forwarding or blocking. This is done to ensure that there are no loops in the data transmission process.
root bridge.png


Based on the setting value of the BPDU packet that is received by each port, the following comparison is done to determine how much it will cost to reach the root bridge.

1st Priority: The first comparison made is based on the cost of the root path.

The path cost value that was established for the output port of each bridge is added to the root path cost value of the BPDU packet whenever one of those bridges transfers a BPDU packet. Because of this, the value of the root route cost is equal to the sum of the values of the path cost for each link that must be traversed before arriving at the root bridge.

2nd Priority: When comparing two bridges with the same root path cost, use the bridge IDs of the counterpart bridges for the comparison.

3rd Priority: It is necessary to compare using the port IDs of the counterpart ports when the bridge IDs of the counterpart bridges are the same. This is the case in situations in which each port is connected to the same bridge.


Please enter your comment!
Please enter your name here