![Cisco 2948G - Catalyst Switch Configuration Manual Download Page 121](http://html.mh-extra.com/html/cisco/2948g-catalyst-switch/2948g-catalyst-switch_configuration-manual_67462121.webp)
7-25
Catalyst 4500 Series, Catalyst 2948G, Catalyst 2980G Switches Software Configuration Guide
—
Release 8.1
78-15486-01
Chapter 7 Configuring Spanning Tree
Using PVST+
Configuring the 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 that are attached to faster media (such as full duplex),
and higher numbers to ports that are attached to slower media.The possible range of cost is from
1–65535. The default differs for different media. Typically, the path cost is 1000 ÷ LAN speed in
megabits per second.
To configure the port cost for a port, perform this task in privileged mode:
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 Vlan Port-State Cost Prio Portfast Channel_id
------------------------ ---- ------------- --------- ---- -------- ----------
1/1 1 not-connected 4 32 disabled 0
1/2 1 not-connected 4 32 disabled 0
2/1 1 not-connected 100 32 disabled 0
2/2 1 not-connected 100 32 disabled 0
2/3 1 forwarding 12 32 disabled 0
2/4 1 not-connected 100 32 disabled
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 from 0–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:
This example shows how to configure the port priority for a port:
Console> (enable) set spantree portpri 2/3 16
Bridge port 2/3 port priority set to 16.
Console> (enable) show spantree 2/3
VLAN 1
.
.
.
Task
Command
Step 1
Configure the port cost for a switch port.
set spantree portcost {mod/port} cost
Step 2
Verify the port cost setting.
show spantree mod/port
Task
Command
Step 1
Configure the port priority for a switch port.
set spantree portpri mod_num/port_num priority
Step 2
Verify the port priority setting.
show spantree mod/port