spanning-tree cost

Changes an interface's spanning-tree port path cost.

Syntax

spanning-tree cost cost
no spanning-tree cost cost

Command Default

The default path cost is 200000000.

Parameters

cost
Specifies the path cost for the Spanning Tree Protocol (STP) calculations. Valid values range from 1 through 200000000.

Modes

Interface configuration mode

Usage Guidelines

Lower path cost indicates a greater chance of becoming root.

Examples

To set the port cost to 128:

device# configure terminal
device(config)# interface ethernet 1/5 
device(conf-if-eth-1/5)# spanning-tree cost 128