Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
New Member

OSPF cost ?

Hi,

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 ?

Cheers,

Phil.

5 REPLIES
Hall of Fame Super Silver

Re: OSPF cost ?

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

see

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.

http://www.cisco.com/en/US/docs/ios/iproute/command/reference/irp_osp1.html#wp1012911

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

Giuseppe

New Member

Re: OSPF cost ?

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.

Cheers,

Phil.

New Member

Re: OSPF cost ?

Hi,

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 ?

Cheers,

Phil.

New Member

Re: OSPF cost ?

the default seed metric is 1 except for BGP routes which is 20.

New Member

Re: OSPF cost ?

Hi,

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.

Cheers,

Phil.

288
Views
7
Helpful
5
Replies
CreatePlease to create content