spanning-tree cost

Syntax

spanning-tree cost <PORT-COST>

no spanning-tree cost [<PORT-COST>]

Description

Sets individual port cost for MSTI 0.

For a given port, the path cost setting can be different for different MSTIs to which the port may belong.

The switch uses the path cost to determine which ports are the forwarding ports in the MSTI; that is, which links to use for the active topology of the MSTI and which ports to block.

The no form of the command sets the port cost for MSTI 0 instance to the default value.

Command context

config-if

Parameters

<PORT-COST>
Specifies the cost of the port for MSTI 0. Range: 1-200,000,000. Default is calculated from the port link speed:
  • 10 Mbps link speed equals a path cost of 2,000,000.

  • 100 Mbps link speed equals a path cost of 200,000.

  • 1 Gbps link speed equals a path cost of 20,000.

  • 2 Gbps link speed equals a path cost of 10,000.

  • 10 Gbps link speed equals a path cost of 2,000.

  • 100 Gbps link speed equals a path cost of 200.

  • 1 Tbps link speed equals a path cost of 20.

Authority

Administrators

Examples

Setting the cost to 2000 on interface 1/1/1:

switch(config)# interface 1/1/1
switch(config-if)# spanning-tree cost 2000

Setting the cost to the default on interface 1/1/1:

switch(config)# interface 1/1/1
switch(config-if)# no spanning-tree cost