Command:

set spantree portcost

Mode:

Switch> (enable)


Syntax:

set spantree portcost mod/port cost [mst]


Syntax Description:
 

mod/port

Variable that specifies the number of the module and the port on the module.

cost

Variable that specifies the number of the path cost; see the "Usage Guidelines" section for more information.

mst

(Optional) Keyword that sets the path cost for an MST port.

Default Port Cost�Short Mode

Port Speed Default Port Cost

4 Mb

250

10 Mb

100

16 Mb

62

100 Mb

19

155 Mb

14

1 Gb

4

10 Gb

2

Default Port Cost�Long Mode

Port Speed Default Port Cost

100 Kb

200,000,000

1 Mb

20,000,000

10 Mb

2,000,000

10 Mb

200,000

1 Gb

20,000

10 Gb

2,000

100 Gb

200

1 Tb

20

10 Tb

2

 


Command Description:

Use the set spantree portcost command to set the path cost for a port.

If the spanning tree mode is short and long or MISTP, valid cost values are from 1 to 65535, otherwise, valid cost values are from 1 to 2,000,000.

This command is not supported by the NAM.

The Spanning Tree Protocol uses port path costs to determine which port to select as a forwarding port. You should assign lower numbers to ports attached to faster media (such as full duplex) and higher numbers to ports attached to slower media.

 


Example:

This example shows how to set the port cost for port 12 on module 2 to 19:

Console> (enable) set spantree portcost 2/12 19

Spantree port 2/12 path cost set to 19.
Console> (enable) 

 


Misconceptions:
None

Related Commands:
show spantree

� Cisco Systems, Inc. 2001, 2002, 2003
World Wide Education

Converted from CHM to HTML with chm2web Pro 2.85 (unicode)