Each interface has a Spanning Tree port cost associated with it, which helps to determine the quickest path between the root bridge and a specified destination. By convention, the higher the port speed, the lower the port cost. By default, this value is set to 0, which forces the port to recalculate Spanning Tree port cost based on the speed of the port and whether or not legacy (802.1D) path cost is enabled.
Use this command to assign different Spanning Tree port costs:
set spantree adminpathcost port-string cost [sid sid]
Valid cost values are:
Valid sid values are 0–4094. If not specified, SID 0 will be assumed.
Note
Please refer to the IEEE 802.1D specification for guidance in setting appropriate cost values for your port speeds.
By default, legacy path cost is disabled. Enabling the device to calculate legacy path costs affects the range of valid values that can be administratively assigned.
To check the status of legacy path cost, use show spantree legacypathcost.
To disable legacy path cost, if necessary use set spantree legacypathcost disable.