cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
3739
Views
13
Helpful
4
Replies

STP Basic Understanding

Arvind Tripathi
Level 1
Level 1

Hello Experts,

I am new in Networking world and learning about Switching part. I am getting confused in Spanning Tree Protocol.

Can some help me to understand this STP part?

What is the purpose of this STP and where we are using it?

Thanks in advance..

2 Accepted Solutions

Accepted Solutions

Hi Arvind,

STP runs on bridges and switches that are 802.1D-compliant. There are different flavors of STP, but 802.1D is the most popular and widely implemented. You implement STP on bridges and switches in order to prevent loops in the network. Use STP in situations where you want redundant links, but not loops. Redundant links are as important as backups in the case of a failover in a network. A failure of your primary activates the backup links so that users can continue to use the network. Without STP on the bridges and switches, such a failure can result in a loop. If two connected switches run different flavors of STP, they require different timings to converge. When different flavors are used in the switches, it creates timing issues between Blocking and Forwarding states. Therefore, it is recommended to use the same flavors of STP. Consider this network:

5-b.gif

In this network, a redundant link is planned between Switch A and Switch B. However, this setup creates the possibility of a bridging loop. For example, a broadcast or multicast packet that transmits from Station M and is destined for Station N simply continues to circulate between both switches.

However, when STP runs on both switches, the network logically looks like this:

5-c.gif

Please Rate if this is helpful....

Spooster IT Services Team

View solution in original post

Talking about Standard (IEEE) Spanning Tree Protocol

The ports on a switch with enabled Spanning Tree Protocol (STP) are in one of the following five port states.

 Blocking

 Listening

 Learning

 Forwarding

 Disabled

A switch does not enter any of these port states immediately except the blocking state. When the Spanning Tree Protocol (STP) is enabled, every switch in the network starts in the blocking state and later changes to the listening and learning states.

Blocking State

The Switch Ports will go into a blocking state at the time of election process, when a switch receives a BPDU on a port that indicates a better path to the Root Switch (Root Bridge), and if a port is not a Root Port or a Designated Port.

A port in the blocking state does not participate in frame forwarding and also discards frames received from the attached network segment. During blocking state, the port is only listening to and processing BPDUs on its interfaces. After 20 seconds, the switch port changes from the blocking state to the listening state.

Listening State

After blocking state, a Root Port or a Designated Port will move to a listening state. All other ports will remain in a blocked state. During the listening state the port discards frames received from the attached network segment and it also discards frames switched from another port for forwarding. At this state, the port receives BPDUs from the network segment and directs them to the switch system module for processing. After 15 seconds, the switch port moves from the listening state to the learning state.

Learning State

A port changes to learning state after listening state. During the learning state, the port is listening for and processing BPDUs . In the listening state, the port begins to process user frames and start updating the MAC address table. But the user frames are not forwarded to the destination. After 15 seconds, the switch port moves from the learning state to the forwarding state.

Forwarding State

A port in the forwarding state forwards frames across the attached network segment. In a forwarding state, the port will process BPDUs , update its MAC Address table with frames that it receives, and forward user traffic through the port. Forwarding State is the normal state. Data and configuration messages are passed through the port, when it is in forwarding state.

Disabled State

A port in the disabled state does not participate in frame forwarding or the operation of STP because a port in the disabled state is considered non-operational.

Spooster IT Services Team

View solution in original post

4 Replies 4

Hi Arvind,

STP runs on bridges and switches that are 802.1D-compliant. There are different flavors of STP, but 802.1D is the most popular and widely implemented. You implement STP on bridges and switches in order to prevent loops in the network. Use STP in situations where you want redundant links, but not loops. Redundant links are as important as backups in the case of a failover in a network. A failure of your primary activates the backup links so that users can continue to use the network. Without STP on the bridges and switches, such a failure can result in a loop. If two connected switches run different flavors of STP, they require different timings to converge. When different flavors are used in the switches, it creates timing issues between Blocking and Forwarding states. Therefore, it is recommended to use the same flavors of STP. Consider this network:

5-b.gif

In this network, a redundant link is planned between Switch A and Switch B. However, this setup creates the possibility of a bridging loop. For example, a broadcast or multicast packet that transmits from Station M and is destined for Station N simply continues to circulate between both switches.

However, when STP runs on both switches, the network logically looks like this:

5-c.gif

Please Rate if this is helpful....

Spooster IT Services Team

Talking about Standard (IEEE) Spanning Tree Protocol

The ports on a switch with enabled Spanning Tree Protocol (STP) are in one of the following five port states.

 Blocking

 Listening

 Learning

 Forwarding

 Disabled

A switch does not enter any of these port states immediately except the blocking state. When the Spanning Tree Protocol (STP) is enabled, every switch in the network starts in the blocking state and later changes to the listening and learning states.

Blocking State

The Switch Ports will go into a blocking state at the time of election process, when a switch receives a BPDU on a port that indicates a better path to the Root Switch (Root Bridge), and if a port is not a Root Port or a Designated Port.

A port in the blocking state does not participate in frame forwarding and also discards frames received from the attached network segment. During blocking state, the port is only listening to and processing BPDUs on its interfaces. After 20 seconds, the switch port changes from the blocking state to the listening state.

Listening State

After blocking state, a Root Port or a Designated Port will move to a listening state. All other ports will remain in a blocked state. During the listening state the port discards frames received from the attached network segment and it also discards frames switched from another port for forwarding. At this state, the port receives BPDUs from the network segment and directs them to the switch system module for processing. After 15 seconds, the switch port moves from the listening state to the learning state.

Learning State

A port changes to learning state after listening state. During the learning state, the port is listening for and processing BPDUs . In the listening state, the port begins to process user frames and start updating the MAC address table. But the user frames are not forwarded to the destination. After 15 seconds, the switch port moves from the learning state to the forwarding state.

Forwarding State

A port in the forwarding state forwards frames across the attached network segment. In a forwarding state, the port will process BPDUs , update its MAC Address table with frames that it receives, and forward user traffic through the port. Forwarding State is the normal state. Data and configuration messages are passed through the port, when it is in forwarding state.

Disabled State

A port in the disabled state does not participate in frame forwarding or the operation of STP because a port in the disabled state is considered non-operational.

Spooster IT Services Team

Hello Sir,

Please clear my doubt, related Hardware through STP's Diagram ?

Thanks

Joseph W. Doherty
Hall of Fame
Hall of Fame

I believe STP was originally designed to permit intentional designed physical closed loops within a L2 infrastructure for redundancy.  The problem with L2, frames can circulate endlessly if there's a closed loop.  (When this happens, generally the L2 network becomes unusable.)  STP logically detects closed loops and logically blocks links from forwarding "normal" frames to insure the topology is loop free.

STP constantly monitors the topology, and if a previously logically blocked link would no longer create a loop, it will unblock it.  (This would happen if an active link lost its connection, another could take its place.)

STP normally blocks all links as they come on-line until it determines allowing it to pass traffic will not create a loop.

For L2 topologies that, by design, do not have any closed loops, STP should still be run to avoid creating an L2 loop accidentally.

Spooster mentions different flavors of STP.  Indeed there are, especially as there are proprietary versions; many will not interoperate.

The big three STP variants are ones based on the original STP, ones based on the "rapid" STP standard or ones based on MST.

When using STP either it will apply to all VLANs on a switch or it may run as a STP instance per VLAN.  The latter allows you to physically use redundant/multiple links.  I.e. with per VLAN STP, link A is unblocked while link B is blocked for VLAN X, but the converse is true for VLAN Y.

Review Cisco Networking for a $25 gift card