Differences between STP and RSTP
November 20, 2008 47 Comments
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 | |
|
|
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 | |
|
|
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):
|
– 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:
|
Use other 6 bits of the flag octet (BPDU type 2/version 2):
|
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) |
Its very good…
really nice with basic info.
Nice document.
Informative, thanks for the effort!
very good,easy to understand!Thanks a lot
It is very easy to understand dthe difference between both. thanks alot,,,,,,,,,,
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.
Overall the article was amazing. Would like to know more about port states and port roles in detail.
Thanks in adv…..
That is what I need! Thnks…
more useful………..can i see the see home page……… if yes plz tell
Would you say that edge/spanning-tree portfast is a mode?
Very good…………..
Its very fantastic explanation to understand, easy to understand
Very nice knowledgeable information about STP and RSTP.
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).
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
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.
very good information on stp and rstp
nice one.. keep it up
yes amazing thanks a lot
excellent !!!
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!
Good document
–Thank you
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….
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.
nice document its very usefull. Thanks a lot..
Hi.. can anyone plz let me know what is the different between BPDU filter & BPDU gaurd command..
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.
Pingback: Dissertation 30/01/2016 | janturba
“– 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.
bundle of thanks for this
STP is timer based algorithm RSTP is sync based
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.
Loved it.Thanks!!
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.
Pingback: Protocolo STP Spanning Tree Protocol « Todo sobre Packet Tracer
hi buddy ,
very nice explaination….
Pingback: designer men's crossbody bags
Pingback: cookit.guru official
Pingback: more about icelbd.com
Pingback: red leather satchel
Pingback: used benchtop milling machine for sale near me
Pingback: use www.radiobez-b.mexican.ru
Pingback: research by the staff of Larri 003 Students Digitalodu
Pingback: what is the website for zte tablets?
Pingback: carta da parati gianni versace
Pingback: best liverwurst