Re: STP Root port selection - missing step?

From: Tom Kacprzynski <tom.kac_at_gmail.com>
Date: Wed, 4 Apr 2012 23:38:03 -0500

So I did some more checking and this is what I found out.

Looks like if you change the priority ID of the local ports (in my case
SW2's Fa0/21) to something like 16, it will use that port, but only after
you disable spanning tree for that vlan and re-enable it. Usually priority
port is changed on the designated bridge not local bridge to influence the
root port selection, which is not the case here.

Rack1SW3#sh spanning-tree vlan 1363 detail

 VLAN1363 is executing the ieee compatible Spanning Tree protocol
  Bridge Identifier has priority 32768, sysid 1363, address 001f.2680.7780
  Configured hello time 2, max age 20, forward delay 15
  Current root has priority 34131, address 001e.f74d.5980
  Root port is 22 (FastEthernet0/20), cost of root path is 19
  Topology change flag set, detected flag not set
  Number of topology changes 1 last change occurred 00:00:34 ago
  Times: hold 1, topology change 35, notification 2
          hello 2, max age 20, forward delay 15
  Timers: hello 0, topology change 0, notification 0, aging 15

 Port 22 (FastEthernet0/20) of VLAN1363 is *forwarding*
   Port path cost 19, Port priority 128, Port Identifier *128.22.*
   *Designated root has priority 34131, address 001e.f74d.5980
   Designated bridge has priority 34131, address 001e.f74d.5980*
   Designated port id is *128.21*, designated path cost 0
   Timers: message age 2, forward delay 0, hold 0
   Number of transitions to forwarding state: 1
   Link type is point-to-point by default
   BPDU: sent 2, received 25

 Port 23 (FastEthernet0/21) of VLAN1363 is *blocking*
   Port path cost 19, Port priority 128, Port Identifier *128.23*.
   *Designated root has priority 34131, address 001e.f74d.5980
   Designated bridge has priority 34131, address 001e.f74d.5980*
   Designated port id is *128.21*, designated path cost 0
   Timers: message age 1, forward delay 0, hold 0
   Number of transitions to forwarding state: 0
   Link type is point-to-point by default
   BPDU: sent 2, received 26

...In the output above you can see that everything is equal on both ports
except the LOCAL port-id. Lower one wins as the root port.

When I change the port priority for fa0/21...nothing happens unless I
disable/enable the vlan (see below).

Rack1SW3#sh spanning-tree vlan 1363 detail | i Port
 Port 22 (FastEthernet0/20) of VLAN1363 is *forwarding*
   Port path cost 19, Port priority 128, Port Identifier *128.22.*
 Port 23 (FastEthernet0/21) of VLAN1363 is *blocking*
   Port path cost 19, Port priority 16, Port Identifier *16.23.*
<--should be preferred

Rack1SW3(config)#*no* spanning-tree vlan 1363
Rack1SW3(config)# spanning-tree vlan 1363

..now it works.

Rack1SW3#sh spanning-tree vlan 1363 detail | i Port
 Port 22 (FastEthernet0/20) of VLAN1363 is *blocking*
   Port path cost 19, Port priority 128, Port Identifier 128.22.
 Port 23 (FastEthernet*0/21*) of VLAN1363 is *forwarding*
   Port path cost 19, Port priority 16, Port Identifier 16.23.

Tom

On Wed, Apr 4, 2012 at 11:24 PM, Tom Kacprzynski <tom.kac_at_gmail.com> wrote:

> Hello
> I'm trying to figure this out something regarding root port selection. The
> root port selection per most documents are:
>
> 1. Lowest cumulative root path cost (sum of received cost + incoming
> port's cost). This step selects the best path.
> 2. Lowest upstream Bridge ID (designated bridge). This selects a unique
> designated switch.
> 3. Lowest upstream port ID (designated bridge's port id). This selects a
> unique switch port, which should become the root port.
>
> My questions is what happens if you reach step 3 and everything is still
> equal?
>
> How is this possible? If you have a simple topology like SW1----SW2===SW3,
> where
>
> - SW1 is the root with only one connection to SW2.
> - SW2 has spanning tree disabled.
> - SW3 has two connection to SW2 (Fa0/20 and Fa0/21)
>
>
> When I did this in a lab, SW3 would see SW1 as the designated and root
> bridge. SW3 would always pick the lowest port, in my example fa0/20 instead
> of fa0/21. So is there a step 4 to the root port selection process, where
> it will pick the lowest port id of the local switch?
>
>
> Thanks
>
> Tom

Blogs and organic groups at http://www.ccie.net
Received on Wed Apr 04 2012 - 23:38:03 ART

This archive was generated by hypermail 2.2.0 : Tue May 01 2012 - 08:20:45 ART