Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements
Webcast-Catalyst9k

Root cost question...

On a production 6509, I am seeing this:

RTR-01#sh spanning-tree int gi2/3 root
VLAN0001         0
VLAN0010         0
VLAN0011         0
VLAN0012         0
VLAN0013         0
VLAN0014         0
VLAN0015         0
VLAN0016         0
VLAN0017         0
VLAN0018         0
VLAN0019         0
VLAN0020         0
VLAN0021         0
VLAN0022         0
VLAN0023         0
VLAN0024         0
VLAN0025         0
VLAN0026         0
VLAN0111         0
VLAN0112         0
RTR-01#sh spanning-tree vlan 111 int gi2/3

Vlan             Role Sts Cost      Prio.Nbr Type
---------------- ---- --- --------- -------- --------------------------------
VLAN0111         Root FWD 4         128.67   P2p

Now I thought the command  "sh spanning-tree int gi2/3 root" showed cost to the root bridge.  So with everything being zero, its implied this the root, which it is but not for vlan 111 and actually all 1XX Vlans have a different root.  Why does vlan111 show its root as out int gi 2/3 but the root cost shows zero?

Issue is we have a issue where a 2950 is acting as root bridge for our wireless vlans, wrong....it should be the 6509, but before I change it over, was wondering about the root port/cost question.

Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions
Silver

Root cost question...

Hello Jimmy !

Thanks for the intersting outputs.

I have reproduced with some catalyst switch (and checked the outputs on some live networks) =>

It appears the command «sh spanning-tree int gi2/3 rootcost » indicates the root cost of the BPDU as it arrives on the interface before the cost is incremented by the ingress Gi2/3 port path cost (of 4).

In your specific case, as the 2950 is the root for vlans 1xx, 2950 is sending vl1xx BPDUs with a root cost defined to 0, explaining why we see 0 for vlans 111 – 112 on the root port of the 6500.

Now when adding a third switch (switch 3) to reach this diagram => Cisco2950-----(Gi2/3)_Cisco6500_(Gi2/4)-----(Gi0/1)Switch3.

On switch 3 => "sh spanning-tree int gi0/1 rootcost" gives

…..

VLAN0025         0
VLAN0026         0

VLAN0111         4
VLAN0112         4

It appears the « sh spanning-tree [vlan x] int y rootcost » is 0 for the ROOT switch and for the root port of a «directly connected» switch as the BPDU has not still been processed (incrementation of the port cost).

When changing the spanning-tree port path cost of int Gi2/3 of 6500 to 10.

sh spanning-tree int gi0/1 rootcost on Switch3 now gives

……

VLAN0025         0
VLAN0026         0

VLAN0111         10
VLAN0112         10

=============================

What is funny is if you have a trunk to a another switch connected to your 6500 (like described as below) :

Cisco2950_-----(Gi2/3)_Cisco6500_(Gi2/4)-----(Gi0/1)Switch3     

"show spanning-tree int gi2/4 rootcost" should give (Gi2/3 port cost back to default of 4)

…….

VLAN0025         0
VLAN0026         0 => Normal as 6500 is the root for this vlan

VLAN0111         4
VLAN0112         4 => The cost has been incremented per the BPDU processing in ingress.

===============================

The documentation is quite rare for this keyword => From Nexus 5k guides (which should be the same as for Catalysts) => rootcost Displays the path cost to the root for specified interfaces for the specified VLANs.

So I would not have to worry about your outputs.

Best regards.

Karim

1 REPLY
Silver

Root cost question...

Hello Jimmy !

Thanks for the intersting outputs.

I have reproduced with some catalyst switch (and checked the outputs on some live networks) =>

It appears the command «sh spanning-tree int gi2/3 rootcost » indicates the root cost of the BPDU as it arrives on the interface before the cost is incremented by the ingress Gi2/3 port path cost (of 4).

In your specific case, as the 2950 is the root for vlans 1xx, 2950 is sending vl1xx BPDUs with a root cost defined to 0, explaining why we see 0 for vlans 111 – 112 on the root port of the 6500.

Now when adding a third switch (switch 3) to reach this diagram => Cisco2950-----(Gi2/3)_Cisco6500_(Gi2/4)-----(Gi0/1)Switch3.

On switch 3 => "sh spanning-tree int gi0/1 rootcost" gives

…..

VLAN0025         0
VLAN0026         0

VLAN0111         4
VLAN0112         4

It appears the « sh spanning-tree [vlan x] int y rootcost » is 0 for the ROOT switch and for the root port of a «directly connected» switch as the BPDU has not still been processed (incrementation of the port cost).

When changing the spanning-tree port path cost of int Gi2/3 of 6500 to 10.

sh spanning-tree int gi0/1 rootcost on Switch3 now gives

……

VLAN0025         0
VLAN0026         0

VLAN0111         10
VLAN0112         10

=============================

What is funny is if you have a trunk to a another switch connected to your 6500 (like described as below) :

Cisco2950_-----(Gi2/3)_Cisco6500_(Gi2/4)-----(Gi0/1)Switch3     

"show spanning-tree int gi2/4 rootcost" should give (Gi2/3 port cost back to default of 4)

…….

VLAN0025         0
VLAN0026         0 => Normal as 6500 is the root for this vlan

VLAN0111         4
VLAN0112         4 => The cost has been incremented per the BPDU processing in ingress.

===============================

The documentation is quite rare for this keyword => From Nexus 5k guides (which should be the same as for Catalysts) => rootcost Displays the path cost to the root for specified interfaces for the specified VLANs.

So I would not have to worry about your outputs.

Best regards.

Karim

802
Views
0
Helpful
1
Replies
CreatePlease to create content