Cisco Nexus 5000 Series Command Reference Release 4.0(1a)N2(1) (OL-16599-01, March 2009)

Send comments to nx5000-docfeedback@cisco.com
2-51
Cisco Nexus 5000 Series Command Reference
OL-16599-01
Chapter 2 Ethernet Commands
spanning-tree cost
spanning-tree cost
To set the path cost of the interface for Spanning Tree Protocol (STP) calculations, use the
spanning-tree cost command. To return to the default settings, use the no form of this command.
spanning-tree [vlan vlan-id] cost {value | auto}
no spanning-tree [vlan vlan-id] cost
Syntax Description
Command Default Port cost is set by the media speed.
Command Modes Interface configuration mode
Command History
Usage Guidelines The STP port path cost default value is determined from the media speed and path cost calculation
method of a LAN interface (see Table 2-1). See the spanning-tree pathcost method command for
information on setting the path cost calculation method for Rapid PVST+.
When you configure the value, higher values will indicate higher costs.
On access ports, assign the port cost by port. On trunk ports, assign the port cost by VLAN; you can
configure all the VLANs on a trunk port as the same port cost.
vlan vlan-id (Optional) Lists the VLANs on this trunk interface for which you want to
assign the path cost. You do not use this parameter on access ports. The range
is from 1 to 4094.
value Value of the port cost. The available cost range depends on the path-cost
calculation method as follows:
short—The range is 1 to 65536.
long—The range is 1 to 200,000,000.
auto Sets the value of the port cost by the media speed of the interface (see to
Table 2-1 for the values).
Release Modification
4.0(0)N1(1a) This command was introduced.
Table 2-1 Default Port Cost
Bandwidth Short Path Cost Method Port Cost Long Path Cost Method Port Cost
10 Mbps 100 2,000,000
100 Mbps 19 200,000
1-Gigabit Ethernet 4 20,000
10-Gigabit Ethernet 2 2,000