cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1573
Views
20
Helpful
21
Replies

OSPF Route Selection

deep.blue
Level 1
Level 1

Hi- I have situation where I will be running OSPF and will be recieving routes on one interface redistributed from BGP so these will be OSPF External Type 2 routes - on another interface I will be recieving routes in OSPF so these will be "intra area".

My question is how I do have the external E2 routes installed in preference to the intra area ones ? Ie the external routes are to be preferred while the intra area ones are back up.

1 Accepted Solution

Accepted Solutions

Rick,

Although OSPF has a single AD for all three kinds of route by default, you can specify different ADs for the different route types. That is what confused me in the first place. But if OSPF arbitrates a priori between O/IA/E, then it is to no avail except in arbitrating between routes from different OSPF processes, as pointed out by Etienne.

Kevin Dorrell

Luxembourg

View solution in original post

21 Replies 21

Kevin Dorrell
Level 10
Level 10

In the router ospf section:

distance ospf external 109

That would give the external routes an AD of 109 as opposed to the other routes 110.

http://www.cisco.com/en/US/products/sw/iosswrel/ps5187/products_command_reference_chapter09186a008017d027.html#wp1039454

If you have more than one re-disribution point, though, check that this is not going to cause any routing loops.

Kevin Dorrell

Luxembourg

hello

does this really work? distance is used to prefer routes from different processes, not from the same process

Etienne

Yes AFAIK it should work. Can someone correct me if I am wrong please? (Although I am aware that the link says "A common reason to use the distance ospf command is when you have multiple OSPF processes ... " Or does the OSPF process arbitrate between the routes before they make it to the AD arbitration?)

Just as EIGRP has a different AD for internal and external routes (90 and 170 respectively), so (I believe) OSPF can be configured to have different ADs on each of the three types of route.

I can feel a lab session imminent!

Kevin Dorrell

Luxembourg

Hi

It certainly works with EIGRP as we have had to temporarily use Kevin's solution, with EIGRP, in our own environment to get us over an integration problem.

As far as i know AD is used to prefer routes from different routing protocols but where a routing protocol has different AD's within it, eg OSFP/EIGRP/BGP it is used there as well.

Jon

Unfortunately I do not think it can be done to have OSPF redistributed routes preferred to OSPF internal routes. OSPF has its own preference for routes which is spelled out in the RFCs and OSPF prefers intra-area routes more than inter-area routes and inter-area routes more than external. I do not believe that there is any way to get AD to change this behavior.

HTH

Rick

HTH

Rick

OK, thank you for that correction Rick.

So, if I understand correctly, OSPF first pre-selects which route it is going to present as a candidate for the forwarding table on the basis of O/IA/E, and without reference to any AD configuration. It then presents that route to the AD arbitration process with the AD=110 or otherwise as configured.

So its behavior is rather different from EIGRP, which does allow you to change the relative priorities of the internal / external routes, if I understand it correctly.

Is that a correct behavioural model?

Kevin Dorrell

Luxembourg

Kevin

I believe that your model is correct.

And note that while EIGRP has separate AD for internal and external routes, OSPF has only a single AD for both kinds of routes.

HTH

Rick

HTH

Rick

Rick,

Although OSPF has a single AD for all three kinds of route by default, you can specify different ADs for the different route types. That is what confused me in the first place. But if OSPF arbitrates a priori between O/IA/E, then it is to no avail except in arbitrating between routes from different OSPF processes, as pointed out by Etienne.

Kevin Dorrell

Luxembourg

Is it possiblel to change the metric type of OSPF route using route map or something?

as we can change it in BGP (origin code) in order to influance the selection of the routes? so the same thing is possible in ospf???

regards

Devang

Devang

What you are suggesting is to change the LSA type advertised by OSPF. I do not believe that there is anything in any route map that would allow you to change the LSA type.

If you think about it, it would be extremely difficult to assure the integrity of the network topology map if some router other than the one that generated the LSA was able to change the LSA type.

HTH

Rick

HTH

Rick

Rick,

so as per your reply AD is only one way to fulfil the requirement right!!!

regards

Devang

Apparently not. It is not possible to use AD to arbitrate between intra-area routes, inter-area routes, and external routes.

I tried it out in the lab just for my own edification, and of course you are right: the arbitration between [O | IA | E] takes precedence over any configured AD differences.

I took three routers on a LAN, and got two of them to source the same prefix, one as a redistrubution and the other as a network statement. In the third router I could see both the Type 5 and the Type 2 in the database, but the Type 2 won. I then set the AD of external routes as 105, but the intra-area route still won with an AD of 110. I then got rid of the intra-area network, and the third router put the external route into the forwarding table with an AD of 105.

So, sorry, the solution I proposed does not work. But I learned a lot in the process, so I'm happy.

Kevin Dorrell

Luxembourg

Kevin...

so using the AD you can achieved that right!!!

regards

Devang

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: