Using PVST+
Configuring PVST+ Port Cost
You can configure the port cost of switch ports. Ports with lower port costs are more likely to be chosen
to forward frames. Assign lower numbers to ports attached to faster media (such as full duplex) and
higher numbers to ports attached to slower media.The possible range of cost is 1 to 65535. The default
differs for different media. Path cost is typically 1000 ÷ LAN speed in megabits per second.
To configure the port cost for a port, perform this task in privileged mode:
Task
Step 1
Configure the port cost for a switch port.
Step 2
Verify the port cost setting.
This example shows how to configure the port VLAN priority on a port and verify the configuration:
Console> (enable) set spantree portcost 2/3 12
Spantree port 2/3 path cost set to 12.
Console> (enable) show spantree 2/3
VLAN 1
.
.
.
Port
------------------------ ---- ------------- --------- ---- -------- ----------
1/1
1/2
2/1
2/2
2/3
2/4
Configuring PVST+ Port Priority
You can configure the port priority of switch ports in PVST+ mode. The port with the lowest priority
value forwards frames for all VLANs. The possible port priority value is 0 to 63. The default is 32. If all
ports have the same priority value, the port with the lowest port number forwards frames.
To configure the port priority for a port, perform this task in privileged mode:
Task
Step 1
Configure the port priority for a switch port.
Step 2
Verify the port priority setting.
This example shows how to configure the port priority for a port:
Console> (enable) set spantree portpri 2/3 16
Bridge port
Console> (enable) show spantree 2/3
VLAN 1
.
.
.
Port
------------------------ ---- ------------- --------- ---- -------- ----------
Software Configuration Guide—Catalyst 4000 Family, Catalyst 2948G, Catalyst 2980G, Releases 6.3 and 6.4
7-16
Vlan Port-State
1
not-connected
1
not-connected
1
not-connected
1
not-connected
1
forwarding
1
not-connected
2/3 port priority set to 16.
Vlan Port-State
Chapter 7
Command
set spantree portcost {mod/port} cost
show spantree mod/port
Cost
Prio Portfast Channel_id
4
32 disabled 0
4
32 disabled 0
100
32 disabled 0
100
32 disabled 0
12
32 disabled 0
100
32 disabled
Command
set spantree portpri mod_num/port_num priority
show spantree mod/port
Cost
Prio Portfast Channel_id
Configuring Spanning Tree
78-12647-02