STP 802.1d and RSTP 802.1w Details

STP and RSTP

 

Spanning-tree protocol:

 

802.1d   STP

802.1w   RSTP

 

Purpose: to prevent switching loops by dropping a tree over Alternate (blocking mode; RSTP) links and in BLK (blocking; STP).

 

Campus model:

 

CORE

Distribution

Access

 

 

 

 

 

 

About STP/RSTP:

 

RSTP – 802.1w

STP – 802.1d

 

What STP/RSTP does is find the best link based off of cost and port priority. Then it drops a tree or block a link that has the most cost. BPDUS has the BID which consists of Bridge Priority.Mac-address. The LOWEST priority plus MAC address of that switch wins the ELECTION for root bridge. However, it is PER VLAN root bridge election. Each VLAN can have its own root bridge. When you first turn on switches, the switches Using STP/RSTP will ELECT the oldest Manufactured switch as the ROOT Bridge.

 

You  can change the Election in a Switches favor by running a few commands.

 

SW1(config)#spanning-tree vlan 1 root primary

 

*what this does is to change the priority to a lower priority than any other priority in the stp domain where it forces the switch you are on and in VLAN 1 to be the lowest root bridge priority which in turn forces the switch you are on to be the Root Bridge per that vlan specified.

 

 

Three ports with STP/RSTP:

 

Root port: use to reach the ROOT bridge (not on root bridge)

 

Designated Port:  FWD port one per link.

 

Alternate/Blocking port: Alternate port if RSTP, Blocking port if STP backup line waiting to be used when primary links go down.

 

 

 

The lowest BID wins election for ROOT bridge.

32768.aaaa.aaaa.aaaa is the lowest BID.

Spanning-tree choosing the best links to use by cost. Below is

A cost chart:

 

Cost                            Bandwidth

 

100                              10 MBps

19                                100 MBps

4                                  1 GBps

2                                  10 GBps

  

 

Tiebreaker routes is based off  of the lower BID (priority.mac-address)

 Cold Memory:

Hello Time = 2 seconds

Max Age = (hello x 10) = 20 seconds

Forward Delay = 15 Seconds

 

 

 

BEST route based of of BID.

Best Route (above) based off of BID. Notice same cost on both sides but lowest BID wins again

for best route.

 

Fact: Oldest Manufacture Date on Switches it is ELECTED root switch unless forced by spanning-tree command.

 

How to Force Root Bridge Election?

 

Sw1(config)#spanning-tree vlan-id root primary

Sw1(config)#spanning-tree vlan-id root secondary

Sw1(config)#spanning-tree vlan-id priority (0-61440 increments of 4096)

 

Explain: what this does is lower the root priority of that bridge so much so it forces it to be  the lowest BID in the switch network to force it to be ROOT bridge. Can create a backup root bridge to insure it is elected when primary root bridge is down.

 

Cold Memory:

Default Secondary root priority is 24576.

Default priority is: 32768

 

 

Cold Memory:

 

50 second recover/failover time using STP

Sub second convergence using failover with RSTP.

 

 

 

Enhancements to STP is RSTP.

 

 

Cold Memory:

RSTP is under 802.1w

STP is under 802.1d

 

 

Cold Memory:

 

Link Modes of STP:

 

Listening  15 seconds listening to BDPUs. Sending/Receiving.

 

Learning  15 seconds learning MAC addresses populating CAM

 

Forwarding – forwarding frames.

 

Blocking – 20 seconds Max Age before moving to blocking mode into Listening

 

Disabled – not normally shown but there is 5 modes/states of STP.

 

Link Modes of RSTP:

 

Discarding –

 

Learning – Learning Source Mac-address-tables for CAM

 

Forwarding –

 

Requirements of RSTP:

To use full features of RSTP you must have these requirements:

 

 

  1. duplex full set on the interface.
  2. point to point network must exist (p2p)
  3. portfast must be set on ports with PCs or servers only(not devices)

 

How to configure SPANNING-TREE PORTFAST.

 

Sw1(config)#int fa0/4

Sw1(config-if)#spanning-tree portfast

 

Explain: this is all you do to set portfast on an interface.DONE!

 

How to set the spanning-tree modes (MST, STP, Rapid-PVST)

 

Sw1(config)#spanning-tree mode ?

Sw1(config)#spanning-tree mode Rapid-PVST

Sw1(config)#spanning-tree mode MST

Sw1(config)#spanning-tree mode STP

 

Sw1(config)#show spanning-tree          

 

Explain: This shows the protocol type for spanning-tree.

 

 

 ==================================

  End of STP vs RSTP

=================================== 

 

 

 

 

 

Cost                            Bandwidth

100                 10   MBps

19                    100 MBps

4                      1     GBps

2                      10   GBps

Cost                            Bandwidth

100                 10   MBps

19                    100 MBps

4                      1     GBps

2                      10   GBps

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Advertisements

4 Responses to “STP 802.1d and RSTP 802.1w Details”

  1. Good idea about STP,RSTP. it help the people

  2. Just thought I would let you know that the 3switches diagram is not quite right. Sw2 has the lower MAC address so would therefore have the DP on its side of the link and Sw3 would have the blocked port. In the diagram you have the Sw2 side blocked but this would only happen if there were other factors in play – but with all things being equal the switch will the highest MAC address will have its port blocked.

    • Steve you are right. I copied my drawings wrong. My drawings are correct like what you said.
      Correction to my 3 switch RSTP drawing should be blocking on the sw3 port side and the sw2 should be a DP.
      Thanks steve..
      my vision sucks! hahahaha
      good catch..
      and good luck..looks like you are going to do well in Network engineering..
      thanks

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: