cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
989
Views
5
Helpful
6
Replies

ospf path selection

From R1's perspective what is best path for external prefix 5.5.5.5/32..

1 Accepted Solution

Accepted Solutions

Peter Paluch
Cisco Employee
Cisco Employee

Hi,

R1 has little choice - it has to go through R2. However, R2 does have a choice, and I personally believe that R2 will use both paths through R3 and R4, assuming the link costs are equal.

R2 will see a single LSA5 originated by R5 and flooded through Area 0. While R5 will also originate an LSA7 into the NSSA area, this LSA will have the P-bit cleared as required by RFC 3101 (RFC 1587), and so will not be translated into LSA5 by R3. We should therefore focus on the way R2 will handle this single LSA5.

R2 will see two LSA5, one received through Area 0 originated by R5, the other originated by R3 as a translation of LSA7 into LSA5. The LSA5 from R5 has its Forwarding Address set to 0.0.0.0; the LSA5 from R3 has the forwarding address set to R5.

On R2, the process will be:

  1. SPF will start processing the LSA5. Because this LSA5 has the Forwarding Address set to 0.0.0.0, SPF will be looking for paths to R5 which have to be either intra-area or inter-area OSPF routes.
  2. RFC2328 Section 16.4 Step 3, together with Section 16.4.1, states that to reach an ASBR, we first prefer intra-area paths through non-backbone areas (but we have no such paths), and if there are none, we consider any other intra-area backbone or inter-area path. This has left us with the intra-area backbone path R2-R4-R5, and the inter-area path R2-R3-R5 which are both of the same cost. Section 16.4 Step 3 further says that in case of multiple least cost paths, we should choose the one with the highest associated area ID. However, for R2, both paths go through Area 0, so we're left with both routes.
  3. Section 16.4 Step 5 says that if the destination 5.5.5.5/32 is not yet in the routing table, install it there with the next hop set to the list of next hops we have identified for the path to the ASBR, and in our case, it should be both R3 and R4. Here, processing of the LSA5 originated by R5 should be finished. Note that by this step, we already have two paths to 5.5.5.5/32 installed in the routing table.

So, in effect, if this analysis is correct, you are using both paths to reach 5.5.5.5/32, assuming that the link costs are equal.

Would this align with your observation if you configured this lab?

Best regards,
Peter

EDIT: Corrected a misleading explanation that assumed that LSA7 originated by R5 will be translated on R3 - it won't because R5 is an ABR and originates a LSA5 for 5.5.5.5/32 into the backbone already, so there is no point in having the same LSA7 translated into another LSA5 by R3. That's why the P-bit in LSA7 will be cleared, preventing it from being translated into LSA5.

View solution in original post

6 Replies 6

dhananjay95929
Level 1
Level 1

What are the costs of the links? There is no information regarding that in the diagram.

Assuming equal cost links there will be equal cost load balancing on paths R1-R2-R4-R5 and R1-R2-R3-R5.

hello dhananjay95929,,,In above topology,R1-R2cost 1,In area 0 that belong R2,R3 and R4 are cost 1.R4-R5 cost 64,and R3-R5 cost 1

Peter Paluch
Cisco Employee
Cisco Employee

Hi,

R1 has little choice - it has to go through R2. However, R2 does have a choice, and I personally believe that R2 will use both paths through R3 and R4, assuming the link costs are equal.

R2 will see a single LSA5 originated by R5 and flooded through Area 0. While R5 will also originate an LSA7 into the NSSA area, this LSA will have the P-bit cleared as required by RFC 3101 (RFC 1587), and so will not be translated into LSA5 by R3. We should therefore focus on the way R2 will handle this single LSA5.

R2 will see two LSA5, one received through Area 0 originated by R5, the other originated by R3 as a translation of LSA7 into LSA5. The LSA5 from R5 has its Forwarding Address set to 0.0.0.0; the LSA5 from R3 has the forwarding address set to R5.

On R2, the process will be:

  1. SPF will start processing the LSA5. Because this LSA5 has the Forwarding Address set to 0.0.0.0, SPF will be looking for paths to R5 which have to be either intra-area or inter-area OSPF routes.
  2. RFC2328 Section 16.4 Step 3, together with Section 16.4.1, states that to reach an ASBR, we first prefer intra-area paths through non-backbone areas (but we have no such paths), and if there are none, we consider any other intra-area backbone or inter-area path. This has left us with the intra-area backbone path R2-R4-R5, and the inter-area path R2-R3-R5 which are both of the same cost. Section 16.4 Step 3 further says that in case of multiple least cost paths, we should choose the one with the highest associated area ID. However, for R2, both paths go through Area 0, so we're left with both routes.
  3. Section 16.4 Step 5 says that if the destination 5.5.5.5/32 is not yet in the routing table, install it there with the next hop set to the list of next hops we have identified for the path to the ASBR, and in our case, it should be both R3 and R4. Here, processing of the LSA5 originated by R5 should be finished. Note that by this step, we already have two paths to 5.5.5.5/32 installed in the routing table.

So, in effect, if this analysis is correct, you are using both paths to reach 5.5.5.5/32, assuming that the link costs are equal.

Would this align with your observation if you configured this lab?

Best regards,
Peter

EDIT: Corrected a misleading explanation that assumed that LSA7 originated by R5 will be translated on R3 - it won't because R5 is an ABR and originates a LSA5 for 5.5.5.5/32 into the backbone already, so there is no point in having the same LSA7 translated into another LSA5 by R3. That's why the P-bit in LSA7 will be cleared, preventing it from being translated into LSA5.

hello peter, oops pressed "corrected option"instead "reply" can't see how to take correct ans off now...

'....

but i have one doubt.. suppose 5.5.5.5/32 are redistribute via eigrp.when nssa border router originate both type -5 and type-7 lsa for same network p-bit must be cleared in the type-7 lsa  so R3 don't translate packet type...please correct me if i am wrong...

Hello,

You're perfectly right... I totally missed that! Yes, you are correct! If an NSSA ASBR originates both LSA7 and LSA5 for a network, the LSA7 will have the P-bit cleared, so it will not be translated into LSA5 by another ABR. So in my previous explanation, the whole part about the translated LSA5 does not hold because there will be no such LSA at all.

I will correct my explanation above.

Please keep in mind that my previous explanation holds only if the link costs are the same. If they are not (and you have later said that they are different indeed), the paths to R5 may end up being different.

Best regards,
Peter

hello peter..so In my topology path will be R1-R2-R4-R5..Am i right..

But i am not able to understand what is purpose ospf forward address....And why we enable ospf into no-ospf domain for non-zero forward address...can u explain detail