![]() |
Spanning tree protocol is a type of communication protocol that functions to build a loop-free topology, which means the arrangement of elements in a computer network. STP commonly works for layer-2 bridges and switches. It also provides a backup link for the network system if the active link fails. Layer-2 devices send the data in the form of frames. The root port of each bridge forms a part of the spanning tree. The ports selected by the spanning tree are the best ports to reach the root bridge, which is also known as the destination port. It means that every switch or bridge has only one root port. If any other switch does not have any root port, it selects one designated port and the other as non-designated ports. The designated port will be considered as the ports in forwarding state, while others in blocking state. STP enables a single port of a node and disables all other ports. It means that it allows only one active path for transmission between the two nodes. The port selected by the STP is named the root port, which sends data to the root bridge. The root bridge receives all the data from different bridges. The cost of the port, port priority, and switch ID determines the path for the destination. If the cost of the port and the switch ID is the lowest, it becomes the path for the destination. Steps of selecting the designated portThe process to select the designated port is listed below:
Example: Consider the below switch diagram: Data transfer in the above diagram will be from switch3 to switch2. Explanation: It is because of the lowest cost. The switch2 has the lowest Bridge ID and is thus selected as the root bridge. Among the switches, switch3, and switch1, one needs to be selected as the designated port and the other is selected as the non-designated port. Since, switch3 has the lowest cost (10<18), it is selected as the designated port made in the forwarding state. Switch1 is selected as the non-designated port made in the blocking state. |
Reffered: https://www.geeksforgeeks.org
Computer Networks |
Type: | Geek |
Category: | Coding |
Sub Category: | Tutorial |
Uploaded by: | Admin |
Views: | 11 |