As an alternative to setting the default interface bandwidth, the cost can be manually configured on an interface using the ip ospf cost value interface configuration command.
An advantage of configuring a cost over setting the interface bandwidth is that the router does not have to calculate the metric when the cost is manually configured. In contrast, when the interface bandwidth is configured, the router must calculate the OSPF cost based on the bandwidth. The ip ospf cost command is useful in multi-vendor environments where non-Cisco routers may use a metric other than bandwidth to calculate the OSPF costs.
Both the bandwidth interface command and the ip ospf cost interface command achieve the same result, which is to provide an accurate value for use by OSPF in determining the best route.
For instance, in the example in Figure 1, the interface bandwidth of serial 0/0/1 is reset to the default value and the OSPF cost is manually set to 15,625. Although the interface bandwidth is reset to the default value, the OSPF cost is set as if the bandwidth was still calculated.
Figure 2 shows the two alternatives that can be used in modifying the costs of the serial links in the topology. The right side of the figure shows the ip ospf cost command equivalents of the bandwidth commands on the left.