< Home

Configuring the Cost of OSPF Interfaces

You can specify the cost of an OSPF link by configuring the cost of an OSPF interface.

Context

To configure the cost of an OSPF link, you can directly configure the cost of an OSPF interface.

If you do not set the cost of the OSPF interface directly, OSPF calculates the cost according to the bandwidth of the interface. The calculation formula is as follows: cost of the interface = bandwidth reference value/interface bandwidth. The integer of the calculated result is the cost of the interface. If the result is smaller than 1, the cost value is 1. You can indirectly change the cost of the interface by changing the bandwidth reference value.

Procedure

  1. Access the system view.

    system-view

  2. Access the interface view.

    interface interface-type interface-number

  3. Configure the cost of OSPF interfaces.

    ospf cost value

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