cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2701
Views
30
Helpful
22
Replies

OSPF Path Selection 2

visitor68
Level 4
Level 4

An ASBR in AREA 2 redistributes a BGP route as a type 5 LSA E1 route.

A core ABR receives the tyoe 5 advertisement from two sources, one from a router connected to its AREA 2 interface and another from its AREA 0 interface.

Assuming the cost through the AREA 2 interface is higher than the cost through its AREA 0 interface, which path will the ABR take to get to the external network?

Thanks

22 Replies 22

Jon Marshall
Hall of Fame
Hall of Fame

ex-engineer wrote:

An ASBR in AREA 2 redistributes a BGP route as a type 5 LSA E1 route.

A core ABR receives the tyoe 5 advertisement from two sources, one from a router connected to its AREA 2 interface and another from its AREA 0 interface.

Assuming the cost through the AREA 2 interface is higher than the cost through its AREA 0 interface, which path will the ABR take to get to the external network?

Thanks

Joe

Not sure i fully understand. How does the ABR for area 2 and 0 receive the advertisement from area 0 ?

Jon

From a second ABR

ASBR

|             |

|                 |
| AREA 2           |  AREA 2
|                            |
|                                |
ABR 1-------------------------ABR 2

                Area 0

Joe

It will still go via it's area 2 interface. I just labbed it up and even though the metric of the E1 route is higher via the area 2 interface that is the route it chooses to install.

It is to do with  the path to get to the advertising router of the E1 route ie.

ABR1 receives the E1 route from ASBR and from ABR2. To get to ASBR from ABR1 is an intra-area route. To get to ABSR via ABR2 is an inter-area route and an intra-area route will always be chosen over the inter-area. So even though the metric is higher the intra-area route is chosen.

Jon

Jon, thanks for the work on this.

Here is my dilemma.

I fully understand the hierarchy when it comes to path selection in OSPF: intra, then inter, then external 1 and lastly external 2...

But the LSA that ABR 1 receives for the external subnet in neither intra-area nor inter-area, its an external type 1.

What address is intra-area as opposed to inter-area. Its not the next hop, because to ABR 1, both next hops are intra-area. [EDIT] - actually, they are directly connected routes [EDIT]

I believe its the Forwarding Address of the external LSA.

ABR 1 will take note that the redistribbuted subnet is an external route, but then it will -- I think -- do a recursive lookup on the forwarding address advertised in the LSA to see which is the better route to get to the external subnet.

Can you please post the route table entry for the external route on ABR1, the OSPF database entry for the external route on the ASBR and ABR, and lastly the route table entry of the forwarding address on ABR1?

I would be very appreciative if you did.

Thank you.

dan_track
Level 1
Level 1

Can you send it as an attachment?

Dan

The drawigng says it all....ASBR advertises a type 5 LSA to ABR 1 and ABR 2. ABR 2 advertises the external LSA to ABR 1. So ABR gets 2 type 5 LSA advertisements, one directly from the ASBR AREA 2 interface and another from ABR 2's AREA 0 crosslink.

Jon Marshall
Hall of Fame
Hall of Fame

Joe

I believe its the Forwarding Address of the external LSA.

ABR 1 will take note that the redistribbuted subnet is an external route, but then it will -- I think -- do a recursive lookup on the forwarding address advertised in the LSA to see which is the better route to get to the external subnet.

It is the ASBR advertising address that is the intra-area vs inter-area route.

You had to ask for outputs just after i had shut down dynamips without saving . No problem, only took a few mins to setup up, i'll get back to you.

Jon

"It is the ASBR advertising address that is the intra-area vs inter-area route."

What is an ASBR advertising address? Isnt that the forwarding address? Or is it the "advertising router" entry in the LSA itself?

Sorry for the hassle...

Hello Joe,

when forwarding address = 0.0.0.0 the forwarding address is the ASBR router-id.

the concept is clear, the forwarding address is the internal next-hop it needs to be known by means of an OSPF route, intra area or inter-area it cannot be known by means of another external route.

So path selection applies to the path to the ASBR, using O E1 routes the seed metric is added to the internal part of the path but selection criteria still apply and an intra-area route is preferred over an inter-area regardless of cost.

The external LSA is received on both area 2 and area 0, but  the intra area path is the only one installed in the IP routing table.

This is what Jon's tests have showed.

Hope to help

Giuseppe

Giuseppe:

I understand what Jon is saying and I am sure he is 100% correct. I just needed to straighten my own thinking on this...

To me, the external LSA on ABR 1 was being received from the ASBR and ABR 2, so I was wondering how ABR 1 would make the routing decision to the external subnet. Would it use cost or would it use the intra-area over inter-area route preference rule to make the decision. The dilemma was that, if it selected the latter, I didnt know what address was going to be used. Would it be the forwarding address, the ASBR's address, or the next hop address?

I guess the answer is that, if the ASBR has not set the forwarding address, it will use itself as the advertising router in the type 5 LSA it generates. Moreover, that address would be the router-ID of the ASBR. In that case, the forwarding address is 0.0.0.0.

If the forwarding address is set, the ASBR will use its router-id as the "advertising router" address in the external type 5 LSA, and another router with which it has an OSPF adjacency as the forwarding address.

Is all this correct?

Hello Joe,

your understanding is correct

I would suggest a reading of  RFC 2328 section:

16.4     Calculating AS external routes

http://www.ietf.org/rfc/rfc2328.txt

>> and another router with which it has an OSPF adjacency as the forwarding  address

well, I would say the forwarding address is known via an IP subnet advertised in an OSPF LSA, it does not imply the router owner of forwarding address  is speaking OSPF too.

Practical Example:

if you redistribute a static route defined with an IP next-hop that IP address may appear as the forwarding address.

The IP subnet to which the next-hop belongs cannot be known by redistribute connected (that would make it another external route)

Edit:

if the forwarding address is not 0.0.0.0 and there are multiple ASBRs one can suppress its own type 5 LSA knowing that both devices may advertise a route to forwarding address so thanks to recursion multiple paths to external route can be achieved even if only one LSA is propagated in the OSPF domain.

This is also explained in the RFC and it is a standard behaviour.

Hope to help

Giuseppe

One more question, please....


R1 and R2 are ASBRs that have direct connections to an external AS.....

R3 is a router that is connected to R1 and R2.

R3 receives a type 5 LSA with the "advertising router" set as R1's router ID and the forwarding address set to R2.

Where will R3 forward the traffic to, R1 or R2?

Hello Joe,

given that a similar case cannot happen in real world and this is a speculation...

the forwarding address should be the answer. the advertising router declares the owner/originator of the LSA data structure, but in this case the forwarding address is the specific field that says how to send traffic for the external destination.

Hope to help

Giuseppe

G:

Why could the scenario i gave you never occur in the real world? Not that Im disagreeing, just want to understand it.

I guess the answer lies in the question of "how does the ASBR select the interface/address to use as a forwarding address"?

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:

Innovations in Cisco Full Stack Observability - A new webinar from Cisco