06-16-2009 08:45 AM - edited 03-06-2019 06:17 AM
I'm practicing spanning-tree with two 2950 switches (Ver 12.1). I have 3 trunks and 3 vlans. I try to change the cost of the interface (for the 3 vlans) and only 2 vlans change the value after I apply the command. The command is "spanning-tree cost 1" in interface mode. Is there any explanation as why only two of the vlans change the cost? I hope to be clear on the scenario.
Solved! Go to Solution.
06-17-2009 09:59 AM
Hello Toshi, Francisco,
we can see that fas0/7 is the root port for vlan 1,2 but not for vlan 3.
the change in port cost has effects on path cost for vlan 1 and 2 but not for vlan3 that uses f0/5 as its root port with default cost 19.
We can guess that fas0/5 may be an access port in vlan3 and it has been selected as the root port for its lower port id 128.5 to be compared to 128.7 for fas0/7.
root bridge id is :
32770:0005.dccb.0580 for vlan2
32771:0005.dccb.0580 for vlan3
this clearly indicates the root bridge is the same device (the other switch).
probably fas0/7 doesn't carry vlan3 and it is a trunk but if so it shouldn't appear in sh spanning-tree vlan 3 output
you can post config and also sh ver of switches.
Hope to help
Giuseppe
06-17-2009 10:58 AM
Francisco,
That's what I'm talking about.
interface FastEthernet0/7
spanning-tree vlan 3 port-priority 128
spanning-tree vlan 3 cost 19
spanning-tree cost 1
!
Obvoiusly, F0/7 has cost 19 for vlan 3 (grin). That's why it was in BLK state. When you configure port cost for a particular vlan it will override what you configured for all vlans.
spanning-tree vlan 3 port-priority 128 This doesn't help you to adjust things for downstream switch. (grin)
I know that you're familiar with SPT now. Have fun mate!!!
Toshi
06-16-2009 10:06 AM
Francisco,
You have to make sure that the root switch is acting as a root of all vlans in your case. When you configure a "spanning-tree cost" command on the switch. That will affect on the local switch. Properly be on the downstream switch to adjust cost to root.
HTH,
Toshi
06-16-2009 11:38 AM
Hello Francisco,
as Toshi has explained STP calculstes the cost to the root bridge but it does it by adding the local port cost that receives the BPDU to the path cost in the BPDU.
A switch advertises out its ports not in STP blocking state a BPDU modified in the following manner:
the sender bridge id is that of the local switch
the port id is that of the outgoing port
the total cost to reach the root bridge is:
cost received on root port + cost of root port
notice that only port-id changes from port to port.
This is different from what happens with routing protocols where the cost is added on the outgoing interface.
So as Toshi notes if one device is the root bridge for one vlan the cost (actually 0) doesn't change if you change the cost of one of its ports.
Hope to help
Giuseppe
06-17-2009 05:52 AM
06-17-2009 06:09 AM
Francisco,
It's kinda weird. Please post a "sh interface trunk" command on both switches. I want to make sure that they are forwarding vlan3. However,it's a good idea to post configuration as well.
HTH,
Toshi
06-17-2009 09:57 AM
Hey Toshi, I just found out by looking at my running-config that port fa 0/7 had the following:
interface FastEthernet0/7
spanning-tree vlan 3 port-priority 128
spanning-tree vlan 3 cost 19
spanning-tree cost 1
!
I thought that setting cots 1 to all vlans in fa 0/7 would override the previous value configured for vlan 3 in that port. I guess it doesn't work that way and you have to erase whatever port cost previously configured..... is that how it works?
I erased line "spanning-tree vlan 3 cost 19" and now vlan 3 porf fa 0/7 has cost 1 and is forwarding.
Thanks.
06-17-2009 10:58 AM
Francisco,
That's what I'm talking about.
interface FastEthernet0/7
spanning-tree vlan 3 port-priority 128
spanning-tree vlan 3 cost 19
spanning-tree cost 1
!
Obvoiusly, F0/7 has cost 19 for vlan 3 (grin). That's why it was in BLK state. When you configure port cost for a particular vlan it will override what you configured for all vlans.
spanning-tree vlan 3 port-priority 128 This doesn't help you to adjust things for downstream switch. (grin)
I know that you're familiar with SPT now. Have fun mate!!!
Toshi
06-17-2009 09:59 AM
Hello Toshi, Francisco,
we can see that fas0/7 is the root port for vlan 1,2 but not for vlan 3.
the change in port cost has effects on path cost for vlan 1 and 2 but not for vlan3 that uses f0/5 as its root port with default cost 19.
We can guess that fas0/5 may be an access port in vlan3 and it has been selected as the root port for its lower port id 128.5 to be compared to 128.7 for fas0/7.
root bridge id is :
32770:0005.dccb.0580 for vlan2
32771:0005.dccb.0580 for vlan3
this clearly indicates the root bridge is the same device (the other switch).
probably fas0/7 doesn't carry vlan3 and it is a trunk but if so it shouldn't appear in sh spanning-tree vlan 3 output
you can post config and also sh ver of switches.
Hope to help
Giuseppe
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