13-13
Software Configuration Guide—Release 12.2(25)SG
OL-7659-03
Chapter13 Understanding and Conf iguring STP
Configuring STP
Configuring STP Port Priority
In the event of a loop, a spanning tree considers port priority when selecting an interface to put into the
forwarding state. You can assign higher priority values to interfaces that you want a spanning tree to
select first and lower priority values to interfaces that you want a spanning tree to select last. If all
interfaces have the same priority value, a spanning tree puts the interface with the lowest interface
number in the forwarding state and blocks other interfaces. The possible priority range is 0 th rough 240,
configurable in increments of 16 (the default is 128).
Note The Cisco IOS software uses the port priority value when the interface is configured as an access port
and uses VLAN port priority values when the interface is configured as a trunk port.
To configure the spanning tree port priority of an interface, perform this task:
This example shows how to configure the spanning tree port priority o f a Fast Ethernet interface:
Switch# configure terminal
Switch(config)# interface fastethernet 5/8
Switch(config-if)# spanning-tree port-priority 100
Switch(config-if)# end
Switch#
This example shows how to verify the configuration of a Fast Ethernet interface when it is configured as
an access port:
Switch# show spanning-tree interface fastethernet 3/1
Vlan Role Sts Cost Prio.Nbr Status
---------------- ---- --- --------- -------- --------------------------------
VLAN0001 Desg FWD 19 128.129 P2p
VLAN1002 Desg FWD 19 128.129 P2p
VLAN1003 Desg FWD 19 128.129 P2p
VLAN1004 Desg FWD 19 128.129 P2p
VLAN1005 Desg FWD 19 128.129 P2p
Switch#
Command Purpose
Step1 Switch(config)# interface {{fastethernet |
gigabitethernet | tengigabitethernet}
slot
/
port
}
| {port-channel
port_channel_number
}
Specifies an interface to configure.
Step2 Switch(config-if)# [no] spanning-tree
port-priority
port_priority
Configures the port priority for an interface. The
port_priority value can be from 0 to 240, in increments
of 16.
You can use the no keyword to restore the defaults.
Step3 Switch(config-if)# [no] spanning-tree vlan
vlan_ID
port-priority
port_priority
Configures the VLAN port priority for an interface. The
port_priority value can be from 0 to 240, in increments
of 16.
You can use the no keyword to restore the defaults.
Step4 Switch(config-if)# end Exits configuration mode.
Step5 Switch# show spanning-tree interface
{{fastethernet | gigabitethernet}
slot
/
port
} |
{port-channel
port_channel_number
}
show spanning-tree vlan
vlan_ID
Verifies the configuration.