Intra vs external ospf route

Unanswered Question
Dec 7th, 2007

Hi All,

I have one route is receiving from 2 directly connectly routers , one from external with AD 60 and other intra with default AD.

But in the router it has installed external route .

So , Admin distance also will play role in OSPF protocol as well.

Pls correct me if my understanding is right ?

I have this problem too.
0 votes
  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 5 (1 ratings)
Jon Marshall Fri, 12/07/2007 - 03:49


If a router has 2 routes to the same destination then it needs to decide which one to use. If they both have the same AD then the routing protocols cost/metrics come into play.

But if one has a lower AD than the other then the one with the lower AD will be chosen. To verify this you can add a static route to the same destination and this is the one that will be installed in the routing table.



vidyaprakash Fri, 12/07/2007 - 03:56

Hi jon,

Thanks for the quick reply and appreciate the same.

Let me make my question more specific,

if the there are 2 ospf routes for the same destination : one for intra area route and other one is external type 2 route.

By default intra area route is prefable than external route.

My question is can we make external type 2 route more preferable than intra area route by using " AD" value

Jon Marshall Fri, 12/07/2007 - 03:59

Well i have never done it but i can't see any reason why that would not work. We have modified the AD of redistributed EIGRP routes before to fix a short term problem.

AD definitely comes before the routing protocol cost/metrics so i think it would be okay but i would need to test fully before i could say 100% for sure.


Kevin Dorrell Fri, 12/07/2007 - 04:42

I remember this discussion from a couple of months ago.

OSPF makes its own descisions internally before presenting its routes to the routing table. Those decisions are based on strict priority:

- intra-area

- inter-area

- E1

- E2 (I think that's the right order ?-)

- N1

- N2

Once it has decided which route to present, it presents it as a candidate using the AD you have configured.

What I am saying is that the AD does not affect the decision process of OSPF, but just the decision process between OSPF and other routing domains (including other instances of OSPF).

As for you question, I'm afraid the simple answer is "you cannot".

Kevin Dorrell


vidyaprakash Fri, 12/07/2007 - 04:54

Hi Kevin,

You mean , ospf will prefer intra route than external ospf route for the same prefix.

Even though external ospf route has less AD value than Intra ospf route

Kevin Dorrell Fri, 12/07/2007 - 05:11

That is correct. The AD does not get attached to the prefix until after OSPF has made its decision.

Richard Burts Fri, 12/07/2007 - 10:30


Kevin is exactly correct about this. AD is used by the process maintaining the routing table. AD is not considered by OSPF when considering 2 OSPF routes.




This Discussion