15-29
Catalyst 6500 Series Switch Cisco IOS Software Configuration Guide—Release 12.1 E
78-14099-04
Chapter 15 Configuring STP and IEEE 802.1s MST
Configuring STP
You also can display spanning tree information for VLAN 200 using the following command:
Router# show spanning-tree vlan 200 interface fastEthernet 4/4
Interface Role Sts Cost Prio.Nbr Status
---------------- ---- --- --------- -------- --------------------------------
Fa4/4 Desg LRN 200000 64.196 P2p
Configuring STP Port Cost
The STP port path cost default value is determined from the media speed of a LAN interface. If a loop
occurs, STP considers port cost when selecting a LAN interface to put into the forwarding state. You can
assign lower cost values to LAN interfaces that you want STP to select first and higher cost values to
LAN interfaces that you want STP to select last. If all LAN interfaces have the same cost value, STP
puts the LAN interface with the lowest LAN interface number in the forwarding state and blocks other
LAN interfaces. The possible cost range is 0 through 200000000 (the default is media specific).
STP uses the port cost value when the LAN interface is configured as an access port and uses VLAN
port cost values when the LAN interface is configured as a trunk port.
To configure the STP port cost of a Layer 2 LAN interface, perform this task:
This example shows how to change the STP port cost of Fast Ethernet port 4/4:
Router# configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)# interface fastEthernet 4/4
Router(config-if)# spanning-tree cost 1000
Router(config-if)# ^Z
Router#
This example shows how to verify the configuration:
Router# show spanning-tree interface fastEthernet 4/4
Vlan Role Sts Cost Prio.Nbr Status
---------------- ---- --- --------- -------- --------------------------------
VLAN0001 Back BLK 1000 160.196 P2p
Command Purpose
Step 1 Router(config)# interface {{type1 slot/port} |
{port-channel port_channel_number}}
1. type = ethernet, fastethernet, gigabitethernet, or tengigabitethernet
Selects an interface to configure.
Step 2 Router(config-if)# spanning-tree cost port_cost Configures the port cost for the LAN interface. The
port_cost value can be from 1 to 200000000 (1 to 65535
in Release 12.1(2)E and earlier releases).
Router(config-if)# no spanning-tree cost Reverts to the default port cost.
Step 3 Router(config-if)# [no] spanning-tree vlan
vlan_ID cost port_cost
Configures the VLAN port cost for the LAN interface.
The port_cost value can be from 1 to 200000000. The
vlan_ID value can be 1 through 4094, except reserved
VLANs (see Table 9-1 on page 9-2).
Step 4 Router(config-if)# no spanning-tree vlan vlan_ID
cost
Reverts to the default VLAN port cost.
Step 5 Router(config-if)# end Exits configuration mode.
Step 6 Router# show spanning-tree interface {type1
slot/port} | {port-channel port_channel_number}
show spanning-tree vlan vlan_ID
Verifies the configuration.