Technical Documentation

Configuring the Metric Value for OSPF Interfaces

All OSPF interfaces have a cost, which is a routing metric that is used in the link-state calculation. Routes with lower total path metrics are preferred over those with higher path metrics.

When several equal-cost routes to a destination exist, traffic is distributed equally among them.

The cost of a route is described by a single dimensionless metric that is determined using the following formula:

cost = reference-bandwidth / bandwidth

You can modify the reference-bandwidth value. The bandwidth value refers to the actual bandwidth of the physical interface.

You can override the default behavior of using the reference bandwidth to calculate the metric cost of a route by configuring a specific metric value for any OSPF interface.

To modify the reference bandwidth, include the reference-bandwidth statement:

reference-bandwidth reference-bandwidth;

For a list of hierarchy levels at which you can include these statements, see the statement summary sections for these statements.

The default value of the reference bandwidth is 100 Mbps (which you specify as 100,000,000), which gives a metric of 1 for any interface with a physical bandwidth that is 100 Mbps or greater. For reference-bandwidth, you can configure a value from 9600 through 1,000,000,000,000 bits.

For example, if you set the reference bandwidth to 1 Gbps (that is, reference-bandwidth is set to 1,000,000,000), a 100-Mbps interface has a default metric of 10.

By default, the loopback interface (lo0) metric is 0. No bandwidth is associated with the loopback interface.

When you specify a metric for a specific OSPF interface, that value is used to determine the cost of routes advertised from that interface. To specify a metric for routes advertised from an interface, include the metric statement:

area area-id {interface interface-name {metric metric;}}

For metric, you can specify a value from 1 through 65,535.

Related Topics


Published: 2010-07-02

Help
|
My Account
|
Log Out