Wednesday, June 17, 2009
STP v/s RSTP
Spanning Tree Protocol (STP) is used to avoid layer-2 loops or switching loops. Some of the terminologies used in spanning tree protocol are Root Bridge-RB (It is normally the powerful switch on the network means with high processor, high memory etc), Non-Root Bridge-NRB (switches other than root bridge are called NRB), Designated Port-DP (The port which transmit best BPDU and ports of root bridge are always designated port because it turns into forwarding state) and Root Port-RP (the port which receive best BPDU)both are also called Forwarding Ports, and Non-Designated-NDP Port also called Blocking Port. There election of RB and NRB is done on the basis of priority and MAC address collectively called Bridge ID. There are certain conditions for the election, i.e. One Root Bridge / Network, One Designated Port / Segment ( Root Bridge ID, Path Cost to the Root, Sender Bridge ID (SBID), Port ID (PID)), One Root Port / Non-Root Bridge( Path Cost to the Root, Sender Bridge ID (SBID), Port ID (PID)).
RSTP (Rapid Spanning Tree Protocol) on the other hand is an 802.1w IEEE standard and is backward compatible with 802.1D (STP) on per port basis. RSTP is fast from STP because here the convergence is done by each link or done on link by link basis. We have different Port States ( Discarding, Learning, Forwarding), Port Roles ( Root-Port, Designated , Backup, Alternate), Port Types( Edge Port, Non-Edge Ports) and Link Types ( Shared Links, Point-to-Point).
Now the question arises that whether to use STP or RSTP in our networks, so look at the following configurations and the output then we can conclude which to use and why?
Its enable by default now look at the first figure that Fast Ethernet 0/2 on MLS 1 is down to see the result I am going to shutdown Fast Ethernet 0/3 and let’s see how much time Fast Ethernet 0/2 took to get up and see the packets that are dropped in the mean while. Look at the Figure A and see before and after shutting down the Fast Ethernet 0/3 and in the mean while the packets that are dropped are show by black circle and then communications starts so here communication is almost 97 Percent.
Now to enable RSTP on all switches just we have to enter a single command. i.e.
MLS-0(config) # spanning-tree mode rapid-pvst
MLS-1(config) # spanning-tree mode rapid-pvst
MLS-2(config) # spanning-tree mode rapid-pvst
Now look at the second figure that Fast Ethernet 0/3 on MLS 1 is down, to see the result I am going to shutdown Fast Ethernet 0/2 and see how much time Fast Ethernet 0/3 took to get up and see now how much packets are dropped in the mean while. Look at the Figure A and see before and after shutting down the Fast Ethernet 0/2 and in the mean while the packets that are dropped are show by black circle and then communications starts so here communication is almost 99 Percent which is consider perfect as 1% is negligible.
So we came to conclusion that RSTP is better to implement on our network as we will not face data loss that we can face in STP.
Hope it will be informative for you. Thank You for Visiting.