background image
192
Chapter 5
Using Spanning Tree with VLANs
You would verify the change with the show spantree command. How-
ever, because both ports are in forwarding mode, the command shown
above will not change the switch's STP parameters. Notice in the following
switch output that both ports are forwarding, but the costs of the ports are
different:
Port Vlan Port-State Cost Priority Fast-Start
--------- ---- ------------- ----- -------- ----------
1/1 1 forwarding 10 32 disabled
1/2 1 forwarding 19 32 disabled
Remember that a root switch will be forwarding on all active ports, so the
port IDs are irrelevant to the switch. However, the 1900 must then choose
a port to perform blocking on the interface with the lowest cost.
To change the port cost on a 1900 CLI-based switch, use the spantree
cost
interface command. The cost values can be any number from 1 to
65535; however, you cannot make it less than the path cost of both links. For
example, notice in the following switch output that we tried to set port f0/
26 to a lower number than the default of 10. The switch would not allow us
to do that because both f0/26 and f0/27 are running the default of 10. What
we need to do is to raise the port priority of the port we don't want STP to
use for forwarding. Notice that we changed the cost of port f0/27 to 20. This
should make the f0/26 port a more desirable path:
1900A#config t
Enter configuration commands, one per line. End with
CNTL/Z
1900A(config)#int f0/26
1900A(config-if)#spantree cost 5
Error: Option 1 path cost should be greater
than or equal to option 2 path cost 10
1900A(config-if)#int f0/27
1900A(config-if)#spantree cost 20
1900A(config-if)#
To verify the port priorities, use the show spantree command:
Port FastEthernet 0/26 of VLAN1 is Forwarding
Port path cost 10, Port priority 128
Designated root has priority 8192, address
00E0.3488.FC00
Copyright ©2000 SYBEX , Inc., Alameda, CA
www.sybex.com