Spanning Tree Protocol: STP
Purpose: Avoid loops in a switched network and implement link backup.
The main task is to run the STA (Spanning Tree Algorithm step :)
1. determine the root node. (The bridge id is compared)
The bridge id consists of 8 bytes, including the priority of 2 bytes and the MAC address of 6 bytes.
1. In all connected vswitches, first check the priority. The minimum priority is the root node. The default priority value is 32768.
2. If the priority is the same, compare the MAC address. If the MAC address is smaller, the root node is used.
2. determine the root port among all non-root nodes.
1. Compare the cost value. If the cost value is small, the root port is used.
2. The cost value is the same, and the bridge id is compared. The smaller one is the root port.
3. If the bridge id is the same, check the port number of the upstream connection. If the port id is small, it is the root port.
3. Select the specified port
Select the specified port on the connection between vswitches.
All ports on the Root Node belong to the specified port
1. Compare the cost size. If the cost value is smaller, the specified port is used.
4. Blocked ports
The blocked port is the port relative to the specified port.
This article is from the "hydrostatic" blog