The (Necessary) Evils of Spanning Tree, Part III

Port States, Get it?

To pick up where we left off, I wanted to take a minute to talk about 802.d port states, not to be confused with US states on the eastern/western seaboard (insert groan here at the bad joke).  In traditional spanning tree, remember that a loop-free path through te network is essential, and the mechanics of that is a little bit of paranoia.  The protocol assumes that loops can creep in undetected at various stages of the game (so to speak) and one of the mechanisms to prevent that is port states…a series of stages that a switch port must go through in order to pass traffic.  Think of each as a “check point” on a tightly guarded road, at which the vehicle is allowed through to the next point.  Here are the port states, in order:

  1. Blocking (does not pass traffic, forward frames, or learn MAC addresses)
  2. Listening (does not pass traffic, forward frames, or learn MAC addresses)
  3. Learning (does not pass traffic, forward frames, but does learn MAC addresses)
  4. Forwarding (passes traffic, forwards frames, and learns MAC addresses)
  5. Disabled (shutdown , does not pass traffic, forward frames, or learn MAC addresses)

Another important part of the spanning-tree process is how the path through the network is determined, and the short answer is cost.  Every functioning interface has a cost associated with it that is based on the bandwidth of the port, which is selected by default but can be changed through manual configuration.  At the grocery store, for example, you are far more likely to buy an item on sale at a discount than you are to pay full price, given a choice.  Spanning-tree does the same thing by choosing lower-cost ports (and as a result, paths) to find the best way back to the root switch.  Keep in mind that cost is cumulative from a given switch back to the root, but the principle is pretty straightforward.

What if could get all the strengths of spanning tree (loop-free path calculation, the enhancements explained in the last blog, etc.) without its weaknesses (such as a 50-second convergence time)?  That was the essential question that sparked a more improved/updated version of spanning-tree, known as Rapid Spanning-Tree (RSTP, 802.1w), which incorporated all of the Cisco-based improvements such as portfast, uplinkfast, and backbonefast and made them standard features.  In addition, the port states discussed earlier collapse from five to just three, namely discarding (replaces disabled, blocking and listening), learning, and forwarding.  As a sort of “icing on the cake,” the Maxage timer is dropped from 20 seconds to 5 and forward-delay is eliminated altogether, resulting in a convergence time of less than 10 seconds.  Take that, 802.1d!

– Joe

Advertisements

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: