Reference Guide

Open Shortest Path First (OSPFv2 and OSPFv3) | 665
OSPF Cost
OSPF calculates the shortest path to a destination by taking into account the cost of the available OSPF
links. In OSPF, a lower link cost indicates a preferred interface to use for sending traffic.
An OSPF cost is a value that ranges from 1 to 65535. By default link costs are automatically calculated on
an OSPF router according to the bandwidth provided by each interface type; for example, the default cost
on a 10GE or 100MB interface is 1 and on a 10MB interface is 10. The default OSPF cost on an interface
is calculated as: 10
8
/ interface bandwidth (in bps). The higher the cost, the less likely for an interface to be
used to transmit OSPF traffic.
You can specify that the cost for transmitting OSPF packets on an interface is calculated according to an
amount of specified bandwidth globally configured with the auto-cost
reference-bandwidth command. In
this case, the OSPF cost is calculated as:
reference-bandwidth / interface bandwidth (in bps). The higher
the reference bandwidth, the higher the cost.
You can also explicitly configure the cost for transmitting OSPF packets on an interface by using the ip
ospf cost command in interface configuration mode and specifying a cost value from 1 to 65535.
The configuration commands used to configure OSPF cost are as follows:
Implementing OSPF with FTOS
FTOS supports up to 10,000 OSPF routes. Within that 10,000 up to 8,000 routes can be designated as
external and up to 2,000 designated as inter/intra area routes.
FTOS version 7.8.1.0 and later support multiple OSPF processes (OSPF MP).
Prior to 7.8.1.0, FTOS supports 1 OSPFv2 and 1 OSPFv3 process ID per system. Recall that OSPFv2 and
OSPFv3 can coexist but must be configured individually.
Command Syntax Command Mode Usage
auto-cost
reference-bandwidth
ROUTER OSPF Configure the cost of transmitting OSPF traffic on router interfaces
to be calculated according to the specified reference bandwidth.
Range: 1 to 4294967 (megabits per second). Default: 100 MB per
second.
ip ospf cost CONFIG-INTERFACE Change the cost associated with transmitting OSPF traffic on an
interface.
Range: 1 to 65535. The default cost depends on the interface speed.