confirms the cost settings.
Enter configuration commands, one per line. End with CNTL/Z.
ptg29743230
492 CCNA 200-301 Official Cert Guide, Volume 1
Gi0/0/0 1 0 10.1.12.1/24 4 DR 1/1
Gi0/1/0 1 0 10.1.13.1/24 5 BDR 1/1
Gi0/2/0 1 0 10.1.14.1/24 1 DR 1/1
The output also shows a cost value of 1 for the other Gigabit interfaces, which is the default
OSPF cost for any interface faster than 100 Mbps. The next topic discusses how IOS deter-
mines the default cost values.
Setting the Cost Based on Interface and Reference Bandwidth
Routers use a per-interface bandwidth setting to describe the speed of the interface. Note
that the interface bandwidth setting does not influence the actual transmission speed.
Instead, the interface bandwidth acts as a configurable setting to represent the speed of
the interface, with the option to configure the bandwidth to match the actual transmis-
sion speed…or not. To support this logic, IOS sets a default interface bandwidth value that
matches the physical transmission speed when possible, but also allows the configuration of
the interface bandwidth using bandwidth speed interface subcommand.
OSPF (as well as other IOS features) uses the interface bandwidth to make decisions, with
OSPF using the interface bandwidth in its calculation of the default OSPF cost for each
interface. IOS uses the following formula to choose an interface’s OSPF cost if the cost for
cases in which the ip ospf cost command is not configured on the interface. IOS puts the
interface’s bandwidth in the denominator and an OSPF setting called the reference band-
width in the numerator:
Reference_bandwidth / Interface_bandwidth
Note that while you can change both the interface bandwidth and reference bandwidth via
configuration, because several IOS features make use of the bandwidth setting, you should
avoid changing the interface bandwidth as a means to influence the default OSPF cost.
That being said, many enterprises do use default cost settings while influencing the default
by changing the OSPF reference bandwidth while leaving the interface bandwidth as an
accurate representation of link speed. Cisco chose the IOS default reference bandwidth set-
ting decades ago in an era with much slower links. As a result, any interface with an interface
bandwidth of 100 Mbps or faster ties with a calculated OSPF cost of 1 when using the
default reference bandwidth. So, when relying on the default OSPF cost calculation, it helps
to configure the reference bandwidth to another value.
To see the issue, consider Table 20-3, which lists several types of interfaces, the default inter-
face bandwidth on those interfaces, and the OSPF cost calculated with the default OSPF
reference bandwidth of 100 MBps (that is, 100,000 Kbps). (OSPF rounds up for these calcu-
lations, resulting in a lowest possible OSPF interface cost of 1.)
Technet24
||||||||||||||||||||
||||||||||||||||||||