Wednesday, 4 May 2011

Spanning-Tree Protocol Port States

Propagation delays can occur when protocol information is passed through a switched LAN. As a result, topology changes can take place at different times and at different places in a switched network. When a switch port transitions directly from non-participation in the stable topology to the forwarding state, it can create temporary data loops. Ports must wait for new topology information to propagate through the switched LAN before starting to forward frames. They must also allow the frame lifetime to expire for frames that have been forwarded using the old topology.
Each port on a switch using Spanning-Tree Protocol exists in one of the following five states:
-Blocking
-Listening
-Learning
-Forwarding
-Disabled

A port moves through these five states as follows:
------------------------------------------------------------
From initialization to blocking
From blocking to listening or to disabled
From listening to learning or to disabled
From learning to forwarding or to disabled
From forwarding to disabled

You can modify each port state by using management software. When Spanning-Tree Protocol is enabled, every switch in the network goes through the blocking state and the transitory states of listening and learning at power up. If properly configured, the ports then stabilize to the forwarding or blocking state.
When the spanning-tree algorithm determines that a port should be placed in the forwarding state, the following occurs:
The port is put into the listening state while it waits for protocol information that suggests it should go to the blocking state.
The port waits for the expiration of a protocol timer that moves the port to the learning state.
In the learning state, the port continues to block frame forwarding as it learns station location information for the forwarding database.
The expiration of a protocol timer moves the port to the forwarding state, where both learning and forwarding are enabled.

Blocking State
A port in the blocking state does not participate in frame forwarding. After initialization, a BPDU is sent to each port in the switch. A switch initially assumes it is the root until it exchanges BPDUs with other switches. This exchange establishes which switch in the network is really the root. If only one switch resides in the network, no exchange occurs, the forward delay timer expires, and the ports move to the listening state. A switch always enters the blocking state following switch initialization.
-A port in the blocking state performs as follows:
-Discards frames received from the attached segment.
-Discards frames switched from another port for forwarding.
-Does not incorporate station location into its address database. (There is no learning at this point, so there is no address database update.)
-Receives BPDUs and directs them to the system module.
-Does not transmit BPDUs received from the system module.
-Receives and responds to network management messages.

Listening State
The listening state is the first transitional state a port enters after the blocking state, when Spanning-Tree Protocol determines that the port should participate in frame forwarding. Learning is disabled in the listening state.
A port in the listening state performs as follows:
-Discards frames received from the attached segment.
-Discards frames switched from another port for forwarding.
-Does not incorporate station location into its address database. (There is no learning at this point, so there is no address database update.)
-Receives BPDUs and directs them to the system module.
-Processes BPDUs received from the system module.
-Receives and responds to network management messages.

Learning State
A port in the learning state is preparing to participate in frame forwarding. This is the second transitional state through which a port moves in anticipation of frame forwarding. The port enters the learning state from the listening state through the operation of Spanning-Tree Protocol.
A port in the learning state performs as follows:
-Discards frames received from the attached segment.
-Discards frames switched from another port for forwarding.
-Incorporates station location into its address database.
-Receives BPDUs and directs them to the system module.
-Receives, processes, and transmits BPDUs received from the system module.
-Receives and responds to network management messages.

Forwarding State
A port in the forwarding state forwards frames. The port enters the forwarding state from the learning state through the operation of Spanning-Tree Protocol.
A port in the forwarding state performs as follows:
-Forwards frames received from the attached segment.
-Forwards frames switched from another port for forwarding.
-Incorporates station location information into its address database.
-Receives BPDUs and directs them to the system module.
-Processes BPDUs received from the system module.
-Receives and responds to network management messages.
Caution Use the immediate-forwarding (portfast) mode only on ports connected to individual workstations to allow these ports to come up and go directly to the forwarding state, rather than having to go through the entire spanning-tree initialization process. To prevent illegal topologies, enable Spanning-Tree Protocol on ports connected to switches or other devices that forward messages.

Disabled StateA port in the disabled state does not participate in frame forwarding or the operation of Spanning-Tree Protocol. A port in the disabled state is virtually nonoperational.
A disabled port performs as follows:
-Discards frames received from the attached segment.
-Discards frames switched from another port for forwarding.
-Does not incorporate station location into its address database. (There is no learning, so there is no address database update.)
-Receives BPDUs, but does not direct them to the system module.
-Does not receive BPDUs for transmission from the system module.
-Receives and responds to network management messages.

No comments:

Post a Comment