7-31
Catalyst 6500 Series Switch Software Configuration Guide—Release 8.7
OL-8978-04
Chapter 7 Configuring Spanning Tree
Configuring PVST+ on the Switch
Configuring the PVST+ Port Cost for a VLAN
You can configure the port cost for a port on a per-VLAN basis. Ports with a lower port cost in the VLAN
are more likely to be chosen to forward frames. You should 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 cost is from 1–65535 when using the short method for calculating port cost and from
1–200000000 when using the long method. The default cost differs for different media. For information
about calculating port cost, see the
“Calculating and Assigning Port Costs” section on page 7-4
.
To configure the PVST+ port VLAN cost for a port, perform this task in privileged mode:
Note
When you use the
set spantree channelcost
command, it does not appear in the configuration file. The
command causes a “set spantree portcost” entry to be created for each port in the channel. See the
“Setting the EtherChannel Port Path Cost”
section in
Chapter 6, “Configuring EtherChannel,”
for
information on using the
set spantree channelcost
command.
This example shows how to configure the PVST+ port VLAN cost on port 2/3 for VLANs 1–5:
Console> (enable)
set spantree portvlancost 2/3 cost 20000 1-5
Port 2/3 VLANs 6-11,13-1005,1025-4094 have path cost 12.
Port 2/3 VLANs 1-5,12 have path cost 20000.
This parameter applies to trunking ports only.
Console> (enable)
Configuring the PVST+ Port Priority for a VLAN
When the switch is in PVST+ mode, you can set the port priority for a trunking port in a VLAN. The
port with the lowest priority value for a specific VLAN forwards frames for that VLAN. The possible
port priority value is a multiple of 16 from 0–240. The default is 16. If all ports have the same priority
value for a particular VLAN, the port with the lowest port number forwards frames for that VLAN.
The port VLAN priority value must be lower than the port priority value.
To configure the port VLAN priority for a port, perform this task in privileged mode:
This example shows how to configure the port priority for VLAN 6 on port 2/3:
Console> (enable)
set spantree portvlanpri 2/3 16 6
Port 2/3 vlans 6 using portpri 16.
Port 2/3 vlans 1-5,7-800,802-1004,1006-4094 using portpri 32.
Port 2/3 vlans 801,1005 using portpri 4.
This parameter applies to trunking ports only.
Task
Command
Configure the PVST+ port cost for a
VLAN on a port.
set spantree portvlancost
{
mod/port
}
[
cost
cost
]
[
vlan_list
]
Task
Command
Step 1
Configure the PVST+ port priority for a VLAN on
a port.
set spantree portvlanpri
mod/port
priority
[
vlans
]
Step 2
Verify the port VLAN priority.
show config all