Differences between STP and RSTP

The following table outlines the main differences between Rapid STP (802.1w) and the legacy STP(802.1d):

STP (802.1d)

Rapid STP (802.1w)

In stable topology only the root sends BPDU and relayed by others. In stable topology all
bridges generate BPDU every Hello (2 sec) : used as “keepalives” mechanism.
Port states
Discarding (replaces disabled, blocking and listening)
To avoid flapping, it takes 3 seconds for a port to migrate from one protocol to another (STP / RSTP) in a mixed segment.
Port roles
Root (Forwarding)
Root (Forwarding)
(Discarding)Backup (Discarding)
Additional configuration to make an end node port a port fast (in case a BPDU is received). – An edge port (end node port) is an integrated Link type which depends on the duplex : Point-to-point for full duplex & shared for half duplex).
Topology changes and convergence
Use timers for convergence (advertised by the root):
(2 sec)
Max Age
(20 sec = 10 missed hellos)
Forward delay timer (15 sec)
– Introduce proposal and agreement process for synchronization (< 1 sec).- Hello, Max Age and Forward delay timer used only for backward compatibility with standard STP
Only RSTP port receiving STP (802.1d) messages will behaves as standard STP.
Slow transition (50sec):
Blocking (20s) =>Listening (15s) =>Learning (15s) =>Forwarding
Faster transition on point-to-point and edge ports only:Less states – No learning state, doesn’t wait to be informed by others, instead, actively looks for possible failure by RLQ (Request Link Query) a feedback mechanism.
Use only 2 bits from the flag octet:Bit 7 : Topology Change Acknowledgment.Bit 0 : Topology Change Use other 6 bits of the flag octet (BPDU type 2/version 2):
Bit 1 : ProposalBit 2, 3 : Port roleBit 4 : LearningBit 5 : ForwardingBit 6 : AgreementBit 0, 7 : TCA & TCN for backward compatibility
The bridge that discover a change in the network inform the root, that in turns informs all others by sending BPDU with TCA bit set and instruct them to clear their DB entries after “short timer” (~Forward delay) expire. TC is flooded through the network, every bridge generate TC (Topology change) and inform its neighbors when it is aware of a topology change and immediately delete old DB entries.
If a non-root bridge doesn’t receive Hello for 10*Hello (advertised from the root), start claiming the root role by generating its own Hello. Wait for 3*Hello on a root port (advertised from the root) before deciding to act.
Wait until TC reach the root + short timer (~Forward delay) expires, then flash all root DB entries Delete immediately local DB except MAC of the port receiving the topology changes (proposal)

About ajnouri
Se vi deziras sekure komuniki eksterbloge, jen mia publika (GPG) ŝlosilo: My public key for secure communication: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x41CCDE1511DF0EB8

35 Responses to Differences between STP and RSTP

  1. Dinesh says:

    Its very good…

  2. farooq says:

    Nice document.

  3. Blessings says:

    Informative, thanks for the effort!

  4. Trupti Gaikwad says:

    very good,easy to understand!Thanks a lot

  5. It is very easy to understand dthe difference between both. thanks alot,,,,,,,,,,

    • pritham says:

      1 more important difference is , In STP only Route bridge sends config BPDU(TCN BPDU should reach route bridge , But in RSTP every switch capable of sending TCN BPDU to all switch when link goes down.

  6. Mohammed says:

    Overall the article was amazing. Would like to know more about port states and port roles in detail.

    Thanks in adv…..

  7. porter says:

    That is what I need! Thnks…

  8. Subashgandhi says:

    more useful………..can i see the see home page……… if yes plz tell

  9. Fulvio Allegretti says:

    Would you say that edge/spanning-tree portfast is a mode?

  10. Suresh Babu K.C. says:

    Very good…………..

  11. Thirupathi Angaiah says:

    Its very fantastic explanation to understand, easy to understand

  12. TechRecur says:

    Very nice knowledgeable information about STP and RSTP.

  13. Jose Gomez says:

    Very good work but I don’t agree about the roles in STP. I’ve read in Cisco documentation (chapter of Brief Summary of STP Port Roles):


    that there’re four port roles (designated, root but also alternate and backup).

    • cciethebeginning says:

      Hi Jose,
      Thank you for your feedback.
      Obviously in that document the author talks about generic spanning tree algorithm, both STP and RSTP included, which might be confusing. Here is a Cisco link explaining the new port roles of RSTP comparing to STP :
      “The root port and designated port roles remain, while the blocking port role is split into the backup and alternate port roles…”


      • Jose Gomez says:

        I agree with you but it’s a bit confused. I understand that the Cisco implementation of 802.1d includes some features (as the alternate and bakcup port roles) that are standard in 802.1w. For example, the Cisco implementation of 802.1d determines an alternate root port if it exists.

  14. very good information on stp and rstp

  15. John says:

    nice one.. keep it up

  16. tamilselvan says:

    yes amazing thanks a lot

  17. Manjit R says:

    excellent !!!

  18. M@sterBl@ster says:

    Good stuff!

    I am a bit confused by the the final “RSTP enhancement”:
    “Delete immediately local DB except MAC of the port receiving the topology changes (proposal).”

    Why would the RSTP bridge keep the MAC addresses learned on the port that it received the TC (proposal) BPDU? Seems like these MACs may not be reachable through that port anymore after the topology change, if these destination MACs live further up the topology than the neighbouring switch and may only be reachable through say an alternate port. An example would be 4 switches in a square topology with 1 of 4 PCs connected to each one of these switches. If these PCs were all communicating with each other and one of the active 3 links connecting the 4 switches fails, wouldn’t there be a period of time where the MAC tables would have “blackhole” entries. (Kinda confusing without a drawing). 🙂

    Thank you!

  19. Sivasamy V says:

    Good document
    –Thank you

  20. Tej says:

    I have really a basic question..Please do not mind…What is the difference between port roles and port states… i.e why do we need port states as we already have port roles….

    • ajnouri says:

      Hi Tej,
      Your question is legitimate and interesting. The closest analogy I can think about is the following: we can all take different roles in a company: employee, manager, engineer, CIO, CFO… and each one pass through different states (condition cycle) (sleeping, working, resting,…)

      Each port can be be elected for one role depending on the topology:
      Root port
      Designated port.
      Alternate port.
      Backup port.

      For a given port to be elected in one of the roles it passes through different states:


      Take a look at this animation :


      frame 10: After the election of a root bridge, each non-root bridges must elect one of its ports as a RP (root-port) the closest to the root bridge.
      Then a designated and non-designated port are elected for each segment.
      Frame 12,14,17,18,20: designated ports are elected, others are in blocking or forwarding state. During all other frames, BPDU is exchanged and each time a port receives TCN (Topology Change Notification) or enabled it passes through (Discarding, Learning, Forwarding) before stabilizing in a given role.

      I hope this clarifies the conceptual difference between states and roles.

  21. srinivas senapathi says:

    nice document its very usefull. Thanks a lot..

  22. Kiran says:

    Hi.. can anyone plz let me know what is the different between BPDU filter & BPDU gaurd command..

    • Vipin says:

      If any BPDU is received on BPDU guard enabled port, that port immediately is put into errdisable state.
      BPDU filter just disable STP on that port if that port received the BPDU.

  23. Pingback: Dissertation 30/01/2016 | janturba

  24. “– An edge port (end node port) is an integrated Link type which depends on the duplex : Point-to-point for full duplex & shared for half duplex).”

    Edge port and link type are orthogonal to each other.

    An edge port has nothing to do with the duplex. A port is either an edge port or not, defined using the PortFast feature or “spanning-tree port type edge” on NX-OS. An edge port can be half-duplex or full-duplex; it’s how the port is configured that’s important. If not explicitly configured, it’s not an edge port.

    Duplex defines the link type — a full-duplex link is a point-to-point link, whereas a half-duplex link is a shared link. RSTP can only rapidly transition links that are point-to-point. It’s possible to override P2P vs shared but usually there’s no reason.

  25. Obaid ur rehman says:

    bundle of thanks for this

  26. Kishore says:

    STP is timer based algorithm RSTP is sync based

  27. Yamanous says:

    About the “keepalive” mechanism, where all switches send BPDU’s — that only applies to Cat6500 (newer code only) and Nexus apparently. I used to think it was an auto-feature of RSTP, until I got in an argument at work about it after an outage from a L2 loop in our DC (ugh!). The suggestion was to enable Bridge_Assurance (the keepalive feature), to which I responded that the keepalive mechanism is natively functional in RSTP.

    After many debating, and confusing Cisco documentation, I decided to simply lab it up and watch:

    1x 3750G with IOS 15 code
    1x 3560G with IOS 15 code (same code)

    I setup a simple trunk link between the two switches, running RPVST+, and everything else defaults. I then did a Local SPAN to my PC (with encapsulation replication). I started up Wireshark, then plugged in the Trunk cable to watch the action.

    1. It is true that BPDU’s are sent in both directions, but only for initial proprosal/agreements for the port roles, which means…
    2. After convergence, BPDU’s are no longer sent upstream — the converged RSTP network looks just like a regular STP network in that the root bridge is the only bridge sending BPDUs.

    After learning this, I wanted to enable “Bridge_Assurance”, but it is apparently not available for the 3560/3750 platforms.

  28. Ashif Rizwan says:

    Loved it.Thanks!!

  29. vikas says:

    hi,i have one question,RSTP will works only after the stp electing the ROOT BRIDGE,ROOT PORT,DP or itll start the process process from starting like STP.and what about the portfast,uplink fast,backbone fast.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: