OSPF
www.netprotocolxpert.in
OSPF Metric value Cost & OSPF default Cost Reference Bandwidth
 Open Shortest Path First (OSPF) uses "Cost" as the value
of metric and uses a Reference Bandwidth of 100 Mbps for
cost calculation.
 The formula to calculate the cost is Reference Bandwidth
divided by interface bandwidth. For example, in the case
of 10 Mbps Ethernet , OSPF Metric Cost value is 100
Mbps / 10 Mbps = 10.
 The default Reference Bandwidth of OSPF is 100 Mbps
and the default OSPF cost formula doesn’t differentiate
between interfaces with bandwidth faster than 100 Mbps.
These days, 1 Gbps and 10 Gbps links are also common.
 The according to the default OSPF metric Cost value
calculation, the default OSPF Cost for Fast Ethernet
interface (100 Mbps) and a Gigabit Ethernet interface (1
Gbps) are same.
 If you want to change the default behavior, the cost
formula can be adjusted using the "auto-cost" command
under the OSPF routing process. If you are changing the
default OSPF Reference Bandwidth, make sure that you
have changed the OSPF Reference Bandwidth in all your
OSPF Routers.
Following table lists OSPF default Cost values for
different interface bandwidths.
Bandwidth OSPF Cost
100 GBPS 1
40 GBPS 1
10 GBPS 1
1 GBPS 1
100 MBPS 1
10 MBPS 10
1.544 MBPS 64
768 KBPS 133
384 KBPS 266
128 KBPS 781
OSPF Router ID
 Each Router in an OSPF network needs a unique OSPF
Router ID. The OSPF Router ID is used to provide a
unique identity to the OSPF Router.
 OSPF Router ID is an IPv4 address (32-bit binary number)
assigned to each router running the OSPF protocol.
 OSPF Router ID should not be changed after the OSPF
process has been started and the ospf neighborships are
established. If you change the OSPF router ID, we need to
either reload the IOS or use "clear ip ospf process"
command, for OSPF Router ID change to take effect.
Reloading the IOS or using "clear ip ospf process"
command can cause temporary network outage.
OSPF Router ID Selection Algorithm
OSPF Router ID selection algorithm works as below.
 Any manually configured OSPF Router ID in OSPF
Process is selected as the OSPF Router ID.
 If there is no OSPF Router ID configured, the highest IP
address on any of the Routers Loopback Interfaces is
selected as the OSPF Router ID.
 If there is no Loopback Interfaces configured, the
highest IP address on its active interfaces is selected as
the OSPF Router ID.
Configure OSPF Router ID
 To configure OSPF Route ID in OSPF Process, follow
these steps.

OSPF

  • 1.
  • 2.
    OSPF Metric valueCost & OSPF default Cost Reference Bandwidth  Open Shortest Path First (OSPF) uses "Cost" as the value of metric and uses a Reference Bandwidth of 100 Mbps for cost calculation.  The formula to calculate the cost is Reference Bandwidth divided by interface bandwidth. For example, in the case of 10 Mbps Ethernet , OSPF Metric Cost value is 100 Mbps / 10 Mbps = 10.  The default Reference Bandwidth of OSPF is 100 Mbps and the default OSPF cost formula doesn’t differentiate between interfaces with bandwidth faster than 100 Mbps. These days, 1 Gbps and 10 Gbps links are also common.
  • 3.
     The accordingto the default OSPF metric Cost value calculation, the default OSPF Cost for Fast Ethernet interface (100 Mbps) and a Gigabit Ethernet interface (1 Gbps) are same.  If you want to change the default behavior, the cost formula can be adjusted using the "auto-cost" command under the OSPF routing process. If you are changing the default OSPF Reference Bandwidth, make sure that you have changed the OSPF Reference Bandwidth in all your OSPF Routers.
  • 4.
    Following table listsOSPF default Cost values for different interface bandwidths. Bandwidth OSPF Cost 100 GBPS 1 40 GBPS 1 10 GBPS 1 1 GBPS 1 100 MBPS 1 10 MBPS 10 1.544 MBPS 64 768 KBPS 133 384 KBPS 266 128 KBPS 781
  • 5.
    OSPF Router ID Each Router in an OSPF network needs a unique OSPF Router ID. The OSPF Router ID is used to provide a unique identity to the OSPF Router.  OSPF Router ID is an IPv4 address (32-bit binary number) assigned to each router running the OSPF protocol.  OSPF Router ID should not be changed after the OSPF process has been started and the ospf neighborships are established. If you change the OSPF router ID, we need to either reload the IOS or use "clear ip ospf process" command, for OSPF Router ID change to take effect. Reloading the IOS or using "clear ip ospf process" command can cause temporary network outage.
  • 6.
    OSPF Router IDSelection Algorithm OSPF Router ID selection algorithm works as below.  Any manually configured OSPF Router ID in OSPF Process is selected as the OSPF Router ID.  If there is no OSPF Router ID configured, the highest IP address on any of the Routers Loopback Interfaces is selected as the OSPF Router ID.  If there is no Loopback Interfaces configured, the highest IP address on its active interfaces is selected as the OSPF Router ID.
  • 7.
    Configure OSPF RouterID  To configure OSPF Route ID in OSPF Process, follow these steps.