20-27
Cisco 7600 Series Router Cisco IOS Software Configuration Guide, Release 12.2SX
OL-4266-08
Chapter 20 Configuring STP and Prestandard IEEE 802.1s MST
Configuring STP
Configuring STP Port Priority
If a loop occurs, STP considers port priority when selecting a LAN port to put into the forwarding state.
You can assign higher priority values to LAN ports that you want STP to select first and lower priority
values to LAN ports that you want STP to select last. If all LAN ports have the same priority value, STP
puts the LAN port with the lowest LAN port number in the forwarding state and blocks other LAN ports.
The possible priority range is 0 through 240 (default 128), configurable in increments of 16.
When the LAN port is configured as a trunk port, you can specify a different port priority for each VLAN
carried by the trunk. VLANs not configured with a VLAN port priority default to using the spanning-tree
port priority. Do not configure VLAN port priority for access ports.
To configure the STP port priority of a Layer 2 LAN interface, perform this task:
This example shows how to configure the STP port priority of Fast Ethernet port 4/4:
Router#
configure terminal
Router(config)#
interface fastethernet 4/4
Router(config-if)#
spanning-tree port-priority 160
Router(config-if)#
end
Router#
This example shows how to verify the configuration of Fast Ethernet port 4/4:
Router#
show spanning-tree interface fastethernet 4/4
Vlan Role Sts Cost Prio.Nbr Status
---------------- ---- --- --------- -------- --------------------------------
VLAN0001 Back BLK 200000 160.196 P2p
VLAN0006 Back BLK 200000 160.196 P2p
...
VLAN0198 Back BLK 200000 160.196 P2p
VLAN0199 Back BLK 200000 160.196 P2p
VLAN0200 Back BLK 200000 160.196 P2p
Router#
Command
Purpose
Step 1
Router(config)#
interface
{{
type
1
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 port-priority
port_priority
Configures the port priority for the LAN interface. The
port_priority
value can be from 0 to 240 in increments
of 16.
Router(config-if)#
no
spanning-tree port-priority
Reverts to the default port priority value.
Step 3
Router(config-if)#
spanning-tree vlan
vlan_ID
port-priority
port_priority
Configures the VLAN port priority for the LAN interface.
The
port_priority
value can be from 0 to 240 in
increments of 16. The
vlan_ID
value can be 1 through
4094, except reserved VLANs (see
Table 14-1 on
page 14-2
).
Router(config-if)# [
no
]
spanning-tree vlan
vlan_ID
port-priority
Reverts to the default VLAN port priority value.
Step 4
Router(config-if)#
end
Exits configuration mode.
Step 5
Router#
show spanning-tree
interface
{
type
1
slot/port
} | {
port-channel
port_channel_number
}
Router#
show spanning-tree
vlan
vlan_ID
Verifies the configuration.