Dynamically Adjusting OSPF Interface Metrics Based on Bandwidth

You can specify a set of bandwidth threshold values and associated metric values for an OSPF interface or for a topology on an OSPF interface. When the bandwidth of an interface changes, the Junos OS automatically sets the interface metric to the value associated with the appropriate bandwidth threshold value. The Junos OS uses the smallest configured bandwidth threshold value that is equal to or higher than the actual interface bandwidth to determine the metric value. If the interface bandwidth is higher than any of the configured bandwidth threshold values, the metric value configured for the interface is used instead of any of the bandwidth-based metric values configured. The ability to recalculate the metric for an interface when its bandwidth changes is especially useful for aggregate interfaces.

To configure bandwidth-based metrics for an OSPF interface or for a topology on an OSPF interface, include the bandwidth-based-metrics statement:

bandwidth-based-metrics {bandwidth value;metric number;}

For the bandwidth value option, specify a number, in bits per second, from 9600 through 1,000,000,000,000.

For the metric number option, specify a value from 1 through 65,535 to associate with each bandwidth value you configure.

Note: You must also configure a metric for the interface when you enable bandwidth-based metrics. For more information, see Configuring the Metric Value for OSPF Interfaces.