[c-nsp] RSTP Learning State

Ross Vandegrift ross at kallisti.us
Sun Apr 19 10:47:40 EDT 2009


On Sun, Apr 19, 2009 at 05:39:10AM +1000, PW wrote:
> Switch A is the root, and when the primary link between AB fails, the root
> port of B goes down, transitions to ALT link almost instanteously.
> 
> However, the spanning tree recalculation that occurs in the triangle BCD
> baffles me... I see links between Switch B, C and D transitions into the
> Learning state for 15 seconds!
> I thought RSTP should be sub-second failover for P2P links, so I'm not sure
> why this 15 seconds is coming up...

A useful analogy is given in 802.1D.  When the root priority of a
bridge changes, a cut is placed in the network at all of the non-root
ports on the bridge that changed.  Each iteration of the STP vector
propogation process pushes the cut out to the next bridge.  This
process repeats until it reaches the edge ports of the extended LAN.

For each port, the bridge computes a vector that represents that
port's priority to be the root port.  When you change Switch A's root
port, the priority vector for the downstream ports changes, meaning
that the downstream bridges need to engage loop prevention to ensure
that any loops in the new topology are detected before bringing the
ports into the forwarding state.

> My questions are:
>  - Why are the ports in Learning state for 15 secs?
>  - Is it possible to reduce/eliminate this 15 secs?

The delay is crucial for STP's ability to detect and migitage
transient loops that may form during the computation of the new
logical topology.  You could try tuning your forward delay (the unit
of time STP delays before moving forward in the port state machine),
but you need to be careful.  Too short, and you'll have ports moving
to forwarding before the loops are removed.

Looking at your topology, it doesn't make much sense for Switch A to
be the root.  Think about the analogy given above - you want to
minimize the maximal distance from the root bridge to the edge ports.
That'll reduce your total convergence time.  Switch B is just extra
distance toward the root.

To understand why STP has this behavior, imagine that Switch C had a
backup link to Switch A.  In this case, Switch C needs to be careful
about its root port.  Switch C and Switch B need to make sure they
agree on what the port states should be, else you'll cause a loop
between A, B, and C.

-- 
Ross Vandegrift
ross at kallisti.us

"If the fight gets hot, the songs get hotter.  If the going gets tough,
the songs get tougher."
	--Woody Guthrie


More information about the cisco-nsp mailing list