OSPF cost ?

Unanswered Question
Oct 30th, 2008


As part of a Lab setup I have 2 routers (R7 & R8) connected via serial (2Mbs). Each router then connects to switch2 (10Mbs). R8 is an ASBR as I am redistributing the connected network between R8 and the switch. I redistribute this network into OSPF using the default metric of 20 and metric-type 1.

I anticipated that the cost from R7 to this network would be (64 + 20) 84, however, the cost is 85 ???

The area between R7 & R8 is NSSA (i.e the serial network).

Any ideas ?



I have this problem too.
0 votes
  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 3.5 (2 ratings)
Giuseppe Larosa Thu, 10/30/2008 - 10:17

Hello Phil,

there was another thread about this.

My understanding is that the seed metric you configure within the router ospf process applies only to redistribution from dynamic routing protocols but not to red connected that uses a seed metric of 0 for the IP subnet of interface redistributed


When enabled, the default-metric command applies a metric value of 0 to redistributed connected routes. The default-metric command does not override metric values that are applied with the redistribute command.


You see an additional one that could be:

the ip ospf cost of the loopback used as OSPF Router-id (not sure just a guess)

Hope to help


philth_123_2 Thu, 10/30/2008 - 10:46

Hi Giuseppe,

I just changed the default metric to 19 in the redistribute command and the cost is now 84 not 85.

It looks therefore like I am getting the extra 1 for redistribution of connected networks into OSPF.



philth_123_2 Thu, 10/30/2008 - 11:13


So can I conclude that when I redistribute a connected network into OSPF, no matter what type of connected interface it is e.g Ethernet or Loopback etc an extra 1 is added to the cost ?



philth_123_2 Fri, 10/31/2008 - 04:08


Another day, but I finally see the solution.

Looking at the ospf database on R7 I noticed that there is an additional metric of 1 for the stub network, in my case a nssa.

By removing the stub area the cost reduces to 84.




This Discussion