STP question

Answered Question
Feb 7th, 2009

Hi. If i have a switch with two connections to another switch, is there a show command that would allow me to see which is the root port in a root bridge and a designated port in a non-root bridge? Running sh spanning-tree only allows me to see if it is a root bridge and sh int trunk only allows me to see the trunk ports?

Thanks in advance.

I have this problem too.
0 votes
Correct Answer by adamclarkuk_2 about 7 years 10 months ago

Hi marcusbruts

There are no root ports on a root bridge, all ports will be designated ports and will be forwarding. Root ports are ports on a non root bridge that have the lowest path cost to the root, ( cost's being determined by speeds or manual intervention within the config ). The command you need is show spanning-tree, if you look a little bit lower it will display the ports and there current states as below

Interface Role Sts Cost Prio.Nbr Type

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

Gi3/8 Root FWD 4 128.264 P2p Peer(STP)

Gi9/13 Desg FWD 4 128.1037 P2p Edge

Po1 Desg FWD 3 128.1665 P2p

Po2 Desg FWD 200000000 128.1666 P2p

As you can see, my root port is Gi 3/8, if this was the brige, all my ports would be Desg forwarding.

Hope that helps.

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 4 (2 ratings)
Loading.
Giuseppe Larosa Sat, 02/07/2009 - 03:47

Hello Mark,

you can use

sh spanning-tree vlan vlan#

sh spanning-tree vlan vlan# interface type x/y

sh spanning-tree interface type x/y

a lot of information is provided by these commands take time to become confident with their output

on switches that supports

sh int trunk

(c6500 and c4500)

you can see the Vlans that are actually in STP fowarding state and not pruned (third and last section of the output)

Hope to help

Giuseppe

marcusbrutus Sat, 02/07/2009 - 07:39

Hi Guiseppe. Thanks for the reply. The thing is i am using an L3 switch with rstp running. I need to find out what port is the alternate port.

Thanks.

Correct Answer
adamclarkuk_2 Sat, 02/07/2009 - 08:05

Hi marcusbruts

There are no root ports on a root bridge, all ports will be designated ports and will be forwarding. Root ports are ports on a non root bridge that have the lowest path cost to the root, ( cost's being determined by speeds or manual intervention within the config ). The command you need is show spanning-tree, if you look a little bit lower it will display the ports and there current states as below

Interface Role Sts Cost Prio.Nbr Type

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

Gi3/8 Root FWD 4 128.264 P2p Peer(STP)

Gi9/13 Desg FWD 4 128.1037 P2p Edge

Po1 Desg FWD 3 128.1665 P2p

Po2 Desg FWD 200000000 128.1666 P2p

As you can see, my root port is Gi 3/8, if this was the brige, all my ports would be Desg forwarding.

Hope that helps.

Actions

This Discussion