2-720
Catalyst 6500 Series Switch Command Reference—Release8.4
OL-6244-01
Chapter2 Catalyst 6500 Series Switch and ROM Monitor Commands
set spantree portvlancost
Usage Guidelines Follow these guidelines when you set the path cost for VLANs on a port:
The cost value specified is used as the path cost of the port for the specified set of VLANs. The rest
of the VLANs have a path cost equal to the port path cost set through the set spantree portcost
command. If not set, the value is the default path cost of the port.
You must supply a vlan_list argument when you first set the cost value. When you subs eq uen tly set
a new cost value, all cost values previously set by entering this command are changed to the new
cost value. If you have never explicitly set a cost value for a VLAN by entering this command, the
cost value for the VLAN does not change.
If you do not explicitly specify a cost value but cost values wer e specified previous ly , the port VLAN
cost is set to 1 less than the current port cost for a port. However, this reduction might not assure
load balancing in all cases.
When setting the path cost for extended-range VLANs, you can create a maximu m of 64 nondefault
entries or create entries until NVRAM is full.
This command is not supported by the NAM.
This command is not supported in MISTP mode.
Examples These examples show how to use the set spantree portvlancost command and explicitly specify the path
cost of a port:
Console> (enable) set spantree portvlancost 2/10 cost 25 1-20
Cannot set portvlancost to a higher value than the port cost, 10, for port 2/10.
Console> (enable)
Console> (enable) set spantree portvlancost 2/10 cost 1-20
Port 2/10 VLANs 1-20 have a path cost of 9.
Console> (enable)
Console> (enable) set spantree portvlancost 2/10 cost 4 1-20
Port 2/10 VLANs 1-20 have path cost 4.
Port 2/10 VLANs 21-1000 have path cost 10.
Console> (enable)
Console> (enable) set spantree portvlancost 2/10 cost 6 21
Port 2/10 VLANs 1-21 have path cost 6.
Port 2/10 VLANs 22-1000 have path cost 10.
Console> (enable)
These examples show how to use the set spantree portvlancost command without explicitly specifying
the path cost of a port:
Console> (enable) set spantree portvlancost 1/2
Port 1/2 VLANs 1-1005 have path cost 3100.
Console> (enable)
Console> (enable) set spantree portvlancost 1/2 21
Port 1/2 VLANs 1-20,22-1005 have path cost 3100.
Port 1/2 VLANs 21 have path cost 3099.
Console> (enable)
Related Commands clear spantree portvlancost
set channel vlancost
show spantree