CCNA Training – OSPF Costs

As a CCNA / CCNP candidate you are expected to100Mbps interface.
understand how to set and interpret the OSPF cost100,000,000/1000,000,000 = 1
function on your Cisco deviceThe same would apply for higher speed interfaces
During your career as a Cisco network engineer yousuch as 10Gbps interfaces which would also be
will have to deal with setting and manipulating theinterpreted by OSPF as having a cost of 1, since
OSPF costs on an interface.OSPF cannot define interface costs as an integer
OSPF uses a metric called "Cost" to calculate thepart of a decimal number i.e. 0.5 or 0.125.
metric of path. The cost is a cumulative value whichSo that OSPF may be able to calculate the cost of
is an incremental metric.an interface based on the bandwidth of the interface
The cost is as a default based on the bandwidth ofwith great accuracy we will need to change the value
the interface. The Higher the interface bandwidth theof the auto-cost reference-bandwidth  value from
lower the cost that is associated to that interface, to100,000,000 to a greater value.
see the cost that is assigned to any given interfaceTo change the ACFB use the following
which is participating in OSPF issue the followingcommands:router(config)#router ospf 1
command:R2_4(config-router)#auto-cost reference-bandwidth
Router# show ip ospf interface 10000
The output of this command will show the current% OSPF: Reference bandwidth is changed.
cost given to this interface. The costs of thePlease ensure reference bandwidth is consistent
interface is calculated by taking the bandwidth of theacross all routers.
interface and dividing this number by a value known 
as the "auto-cost reference-bandwidth". ThisThe auto-cost reference-bandwidth now has a value
auto-cost reference-bandwidth is an integer used toof 10000,000,000 (The value is set in Mbps),
calculate a standard metric across OSPF and is set totherefore now the OSPF process will view the
100,000,000. The cost is calculated as follows:100Mbps interface as having a cost of 100, 1Gbps
100,000,000/BWhaving a Cost of 10 and 10Gbps a cost of 1, another
If the interface bandwidth is 10Mbps, then thepoint worth mentioning is that the router will prompt
resulting cost would be 10:you to make sure that the auto-cost
100,000,000/10,000,000 = 10reference-bandwidth value is set consistently across
If the interface bandwidth is 100Mbps, then theall your routers.
resulting cost would be 1:Note: The cost given to a path is added to the
100,000,000/100,000,000 = 1metric only when the route is received inbound on an
The next example reveals some deficiencies with theinterface, not outbound, therefore should you wish
auto-cost reference-bandwidth set at 100,000,000. Ifto alter the cost of the path you must do this on
we had a 1Gbp interface it's cost will be calculated bythe inbound interface.
OSPF to be the exact same number as that for the