Content

| 3.6 |  | STP Configuration |
| 3.6.5 |  | Setting the port cost |

The spanning tree path cost default value is derived from the media speed of an interface. If a loop occurs, spanning tree uses cost when selecting an interface to put in the Forwarding state. Assign lower cost values to interfaces that the network administrator prefers to have selected first and higher cost values to interfaces that the network administrator wants selected last. If all interfaces have the same cost value, spanning tree puts the interface with the lowest interface number in the Forwarding state and blocks the other interfaces.

Spanning tree uses the cost value when the interface is configured as an access port and uses VLAN port cost values when the interface is configured as a trunk port.

Beginning in privileged EXEC mode, follow the steps shown in Figure to configure the cost of an interface.

The show spanning-tree interface interface-id privileged EXEC command displays information only for ports that are in a link-up operative state. Otherwise, use the show running-config privileged EXEC command to confirm the configuration.

To return the interface to its default setting, use the no spanning-tree [vlan vlan-id] cost interface configuration command.