Five Port States
Table 1 shows the port status of an STP-capable device.
Table 1 Port states
| Port State | Purpose | Description |
| Forwarding | A port in the Forwarding state forwards user traffic and BPDUs. | Only the root port and designated port can enter the Forwarding state. |
| Learning | When a device has a port in the Learning state, the device creates a MAC address table based on the received user traffic but does not forward user traffic. | This is a transitional state, which is designed to prevent temporary loops. |
| Listening | All ports are in the Listening state when STP calculation is being implemented to determine port roles. | This is a transitional state. |
| Blocking | A port in the Blocking state receives and forwards only BPDUs, not user traffic. | This is the final state of a blocked port. |
| Disabled | A port in the Disabled state does not forward BPDUs or user traffic. | The port is Down. |
Figure 1 shows the process of the state transition of a port.
Figure 1 State transition of a port

After a device transitions from the MSTP mode to the STP mode, its STP-capable port supports the same port states as those supported by an MSTP-capable port, including the Forwarding, Learning, and Discarding states. For details, see Table 2.
Table 2 Port status
| Port Status | Description |
| Forwarding | A port in the Forwarding state can send and receive BPDUs as well as forward user traffic. |
| Learning | A port in the Learning state learns MAC addresses from user traffic to construct a MAC address table. In the Learning state, the port can send and receive BPDUs, but not forward user traffic. |
| Discarding | A port in the Discarding state can only receive BPDUs. |
The following parameters affect the STP-capable port states and convergence.
Hello time
The Hello timer specifies the interval at which an STP-capable device sends configuration BPDUs to detect link faults.
When the network topology becomes stable, the change made on the interval takes effect only after a new root bridge takes over. The new root bridge adds certain fields in BPDUs to inform non-root bridges of the change in the interval. After a topology changes, TCN BPDUs will be sent. This interval is irrelevant to the transmission of TCN BPDUs.
Forward Delay time
The Forward Delay timer specifies the delay for interface status transition. When a link fault occurs, STP recalculation is performed, causing the structure of the spanning tree to change. The configuration BPDUs generated during STP recalculation cannot be immediately transmitted over the entire network. If the root port and designated port forward data immediately after being selected, transient loops may occur. Therefore, an interface status transition mechanism is introduced by STP. The newly selected root port and designated port do not forward data until an amount of time equal to twice the forward delay has past. In this manner, the newly generated BPDUs can be transmitted over the network before the newly selected root port and designated port forward data, which prevents transient loops.
The Forward Delay timer specifies the duration of a port spent in both the Listening and Learning states. The default value is 15 seconds. This means that the port stays in the Listening state for 15 seconds and then stays in the Learning state for another 15 seconds. The port in the Listening or Learning state is blocked, which is key to preventing transient loops.
Max Age time
The Max Age time specifies the aging time of BPDUs. The Max Age time can be manually configured on the root bridge.
Configuration BPDUs are transmitted over the entire network, ensuring a unique Max Age value. After a non-root bridge running STP receives a configuration BPDU, the non-root bridge compares the Message Age value with the Max Age value in the received configuration BPDU.
If the Message Age value is smaller than or equal to the Max Age value, the non-root bridge forwards the configuration BPDU.
If the Message Age value is larger than the Max Age value, the configuration BPDU ages and the non-root bridge directly discards it. In this case, the network size is considered too large and the non-root bridge disconnects from the root bridge.
If the configuration BPDU is sent from the root bridge, the value of Message Age is 0. Otherwise, the value of Message Age indicates the total time during which a BPDU is sent from the root bridge to the local bridge, including the delay in transmission. In real world situations, each time a configuration BPDU passes through a bridge, the value of Message Age increases by 1.
Previous post STP/RSTP Parte IV


