The bandwidth-config enable command enables a device to calculate the cost of an OSPF interface based on the configured interface bandwidth.
The undo bandwidth-config enable command disables a device from calculating the cost of an OSPF interface based on the configured interface bandwidth.
By default, a device is not enabled to calculate the cost of an OSPF interface based on the configured interface bandwidth.
Usage Scenario
External factors may affect the physical bandwidth of a link and change the physical bandwidth of an interface, thereby deteriorating network performance. To enable a device to adjust and optimize the route selection rules, run the bandwidth bandwidth command in the OSPF interface to adjust the interface bandwidth and run the bandwidth-config enable command to enable the device to calculate the cost of an OSPF interface based on the configured interface bandwidth. The calculation formula is as follows: Cost of the interface = Bandwidth reference value/Interface bandwidth.
Precautions
If the bandwidth command is not configured, the OSPF interface cost is calculated based on the physical bandwidth of the interface.
If the bandwidth-config enable command is not configured, the OSPF interface cost is calculated based on the physical bandwidth of the interface.