< Home

(Optional) Configuring a Path Cost for a Port

Context

The path cost value range depends on the path cost calculation method. After the cost calculation method is determined, if the link rate of the port is large, you are advised to set a smaller path cost of the port with a larger link rate to be within the specified value range.

On a network where loops occur, if the link rate of a port is small, you are advised to set a large path cost so that the port is selected as the blocking port during spanning tree calculation and its link is blocked.

Procedure

  1. Run system-view

    The system view is displayed.

  2. (Optional) Run stp pathcost-standard { dot1d-1998 | dot1t | legacy }

    A path cost calculation method is specified.

    By default, the IEEE 802.1t standard (dot1t) is used to calculate the path cost.

    All devices on a network must use the same path cost calculation method.

  3. Run interface interface-type interface-number

    The view of an interface participating in spanning tree calculation is displayed.

  4. Run stp cost cost

    A path cost is set for the interface.

    The following describes the supported cost range for different calculation methods:

    • When the Huawei calculation method is used, cost ranges from 1 to 200000.
    • When the IEEE 802.1d standard method is used, cost ranges from 1 to 65535.
    • When the IEEE 802.1t standard method is used, cost ranges from 1 to 200000000.

Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >