02-07-2009 03:26 AM - edited 03-06-2019 03:54 AM
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.
Solved! Go to Solution.
02-07-2009 08:05 AM
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.
02-07-2009 03:47 AM
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
02-07-2009 07:39 AM
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.
02-07-2009 08:05 AM
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.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide