test me

Site Search:

STP Timers and Port States

STP Timers


In a large LAN, topology changes can happen such as a new switch port is brought up or down. When a switch port transitions directly from inactive to active, temporary data loops can be created. Therefore STP introduced timers -- ports must wait for new topology information to spread through out the LAN before frames can be forwarded. Switches must also allow the frame lifetime to expire for frames that have been forwarded using the old topology.


There are 3 STP timers:


  1. hello—The hello time is the time interval before a port sends another BPDUs. This time is equal to 2 seconds by default, but can be tuned from 1 to 10 sec.
  2. forward delay—The forward delay is the time that is spent in the listening and learning state. This time ranges from 4 to 30 sec, is equal to 15 sec by default.
  3. max age—The max age timer controls the maximum length of time that passes before a bridge port saves its configuration BPDU information. This time ranges from 6 to 40 sec, is 20 sec by default.

Each configuration BPDU contains these three parameters. In addition, each BPDU configuration contains another time-related parameter that is known as the message age. The message age is not a fixed value. The message age contains the length of time that has passed since the root bridge initially originated the BPDU. The root bridge sends all its BPDUs with a message age value of 0, and all subsequent switches add 1 to this value. Effectively, this value contains the information on how far you are from the root bridge when you receive a BPDU.

Port States


Each port on a switch using STP is in one of the five states:


  1. Blocking: when a witch running STP is powered on, all ports are in blocking state after initialization. These ports will not send or receive any message across the network segment, but will listen to STP BPDU messages from other switches in the STP network. The ports remain in blocking state for 20 seconds, then transition to the listening state.
  2. Listening: in this state, the port is listening BPDUs and STP uses it to determine which port should participate in frame forwarding and which ports should not, thus determined the network topology. While in the listening state, the port is not forwarding frames. The port stays in listening state for 15 seconds, then transition to the learning state.
  3. Learning: the port continue studying BPDUs -- adding MAC addresses of learned LAN hosts to its MAC address table. In this state, the port is still not forwarding frames. The learning state lasts for 15 seconds before transitioning into the forwarding state.
  4. Forwarding: so far 50 seconds has passed since the switch port is brought up, now the port finally reaches the end goal: frame forwarding. The port is sending and receiving data across the network segment as normal. After the network converges, not all ports are in forwarding state, those ports not selected for frame forwarding return back to blocking state. A port in forwarding state forwards frames directly received from the attached network segment, forwards frames switched from another port for forwarding, continue to update the MAC table about the LAN hosts, receives and processes BPDUs, receives and responds to network management messages such as disabling the port.
  5. Disabled: A switch didn't enter or exit this state automatically, a network administrator has to manually disable the port. This could happen anytime regardless of the the switches state. A disabled port is out of picture from the STP's point of view, it does not participate in frame forwarding or the operation of STP. 

No comments:

Post a Comment