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
Disabled
Blocking
Listening
Learning
Forwarding
Discarding (replaces disabled, blocking and listening)
Learning
Forwarding
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)
Designated
(Forwarding)
Non-Designated
(Blocking)
Root (Forwarding)
Designated
(Forwarding)
Alternate
(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):
Hello
(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 these ads

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

28 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):

    http://www.cisco.com/en/US/tech/tk389/tk621/technologies_tech_note09186a0080094640.shtml#brief_summary

    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…”

      AJN

      • 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:
      Roles:
      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:

      States:
      Discarding
      Learning
      Forwarding

      Take a look at this animation :

      http://www.cisco.com/warp/public/473/spanning_tree1.swf

      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.

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s

%d bloggers like this: