STP - RootPort Election

Unanswered Question
Jun 26th, 2008
User Badges:

Hi there,

As I know the STP root port is a switch port with the lowest cost to the root bridge. The the Switch has to choose between 2 ports witch equal cost to the root, to port with the lower ID becomes the root. PortID=priority.number (ex: 128.7).

In my lab setup the port with the lowest ID dows't become the root. Why? Do I miss something? Could it be a bug or something?

I am running Spanning tree enabled protocol ieee


The setup is as follows:


sw1(f0/1)----------------(f0/1)sw2

(f0/2) . (f0/2)

| |

| |

| |

(f0/2) . (f0/1)

sw4(f0/1)--------------- (f0/2)sw3


The sw4 is the root and the blocking port should be f0/2 of SW2 and not f0/1 of sw2 (as it is as shown by sh spanning-tree command).

##########################3

sw4#sh spanning-tree


VLAN0001

Spanning tree enabled protocol ieee

Root ID Priority 24577

Address 000c.3055.abc0

This bridge is the root

Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec


Bridge ID Priority 24577 (priority 24576 sys-id-ext 1)

Address 000c.3055.abc0

Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

Aging Time 300


Interface Role Sts Cost Prio.Nbr Type

---------------- ---- --- --------- -------- --------------------------------

Fa0/1 Desg FWD 19 128.1 P2p

Fa0/2 Desg FWD 19 128.2 P2p

###########################

sw3#sh spanning-tree


VLAN0001

Spanning tree enabled protocol ieee

Root ID Priority 24577

Address 000c.3055.abc0

Cost 19

Port 2 (FastEthernet0/2)

Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec


Bridge ID Priority 32769 (priority 32768 sys-id-ext 1)

Address 000a.4153.ca40

Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

Aging Time 300


Interface Role Sts Cost Prio.Nbr Type

---------------- ---- --- --------- -------- --------------------------------

Fa0/1 Desg FWD 19 128.1 P2p

Fa0/2 Root FWD 19 128.2 P2p

########################

sw1#sh spanning-tree


VLAN0001

Spanning tree enabled protocol ieee

Root ID Priority 24577

Address 000c.3055.abc0

Cost 19

Port 2 (FastEthernet0/2)

Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec


Bridge ID Priority 32769 (priority 32768 sys-id-ext 1)

Address 000a.418b.d380

Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

Aging Time 300


Interface Role Sts Cost Prio.Nbr Type

---------------- ---- --- --------- -------- --------------------------------

Fa0/1 Desg FWD 19 128.1 P2p

Fa0/2 Root FWD 19 128.2 P2p

###############################


sw2#sh spanning-tree


VLAN0001

Spanning tree enabled protocol ieee

Root ID Priority 24577

Address 000c.3055.abc0

Cost 38

Port 2 (FastEthernet0/2)

Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec


Bridge ID Priority 32769 (priority 32768 sys-id-ext 1)

Address 0008.a34e.6780

Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec

Aging Time 300


Interface Role Sts Cost Prio.Nbr Type

---------------- ---- --- --------- -------- --------------------------------

Fa0/2 Root FWD 19 224.2 P2p

Fa0/1 Altn BLK 19 16.3 P2p


  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (0 ratings)
Loading.
lee.reade Thu, 06/26/2008 - 01:50
User Badges:
  • Silver, 250 points or more

Hi,


The port priority is not taken from the local switch port configuration, it is taken from what is received from the remote switch.


Ie,


Root Switchport1 -------Switch A port1

Root Switchport2 -------Switch A port2


By default port1 on SwitchA will be root port, if you want to use the port priority to effect the stp and have Switch A use port2 instead, then you need to change the port priority on the Root switch port2, ie spanning-tree vlan X port-priority 64 (default is 128)


Now do show spanning-tree interface port2 detail on Switch A and it will show the received value of 64 on port 2, compared to 128 on port 1.


So in your case you need to verify what priority you are received from the root on your two ports.


Hope this helps.


Cheers,


LR

Actions

This Discussion