Chapter 15
Configuring STP and IEEE 802.1s MST
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
---------------- ---- --- --------- -------- --------------------------------
Fa4/4
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:
Command
Step 1
Router(config)# interface {{type
{port-channel port_channel_number}}
Step 2
Router(config-if)# spanning-tree cost port_cost
Router(config-if)# no spanning-tree cost
Step 3
Router(config-if)# [no] spanning-tree vlan
vlan_ID cost port_cost
Step 4
Router(config-if)# no spanning-tree vlan vlan_ID
cost
Step 5
Router(config-if)# end
Step 6
Router# show spanning-tree interface {type
slot/port} | {port-channel port_channel_number}
show spanning-tree vlan vlan_ID
1.
type = ethernet, fastethernet, gigabitethernet, or tengigabitethernet
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.
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
---------------- ---- --- --------- -------- --------------------------------
VLAN0001
78-14064-04
Role Sts Cost
Prio.Nbr Status
Desg LRN 200000
64.196
Purpose
1
Selects an interface to configure.
slot/port} |
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).
Reverts to the default 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
Reverts to the default VLAN port cost.
Exits configuration mode.
1
Verifies the configuration.
Role Sts Cost
Prio.Nbr Status
Back BLK 1000
160.196
Cisco 7600 Series Router Cisco IOS Software Configuration Guide—12.1E
P2p
Table 9-1 on page
9-2).
End with CNTL/Z.
P2p
Configuring STP
15-29