3.12.13. spanning-tree cost

Syntax

spanning-tree cost cost no spanning-tree cost

Parameter


cost The port path cost. For the long path cost method, its valid range is from 0 to 200000000; and the valid range is from 0 to 65535 for the short path cost method. The value 0 indicates AUTO, which the port path cost is determined by the port speed and the path cost method.


Default

The default port path cost is 0, and it is determined by the port speed and the path cost method (long or short).


Interface Long Short

Gigabit Ethernet 20000 4 (1000Mbps)

Fast Ethernet (100Mbps) 200000 19

Ethernet (10Mbps) 2000000 100


Mode

Interface Configuration

Usage

To configure the STP path cost for an interface, use the command spanning-

tree cost in the Interface Configuration mode; and use the no form of the command to restore it to the default configuration.

Example

The following example configures port path cost to 30000 for interface fa2.

Switch(config)# interface gi1
Switch(config-if)# spanning-tree cost 30000