Subject: Re: [OSPF] OSPF NSSA ABR behaviors

From: "Pat Murphy - (650)329-4044" <[email-masked]>
Date: Mon, 08 Feb 2010 17:39:31 -0700 (PDT)

James,

Regarding,

J>One more question about NSSA ABR:

J>In RFC 3101, Section 2.5, step (6e), the following priorities are
J>specified to resolve multiple functional equivalent external LSAs (same
J>destination, cost, and non-zero forwarding address):

                 1. A Type-7 LSA with the P-bit set.
                 2. A Type-5 LSA.
                 3. The LSA with the higher router ID. =20

J>This means that type-7 LSA with P-bit set is preferred over type-5 LSA
J>and type-5 LSA is preferred over type-7 LSA with P-bit clear.

J>I checked the old NSSA RFC (RFC 1587), it specifies a different priority
J>ordering:

                 a. Any type 5 LSA.
                 b. A type-7 LSA with the P-bit set and the forwarding
                    address non-zero.
                 c. Any other type-7 LSA.

J>What is the reason for this change?

RFC 1587 was written before the current OSPFv2 spec, RFC 2328; and its  
calculation is based on the old OSPF spec, RFC 1583. RFC 1587 attempted to 
define a pecking order for external routes of equal preference using its 
tie breaker rules. I was not there at the time; but I suspect the authors 
were grappling with similar routing loops that have since been resolved by 
RFC 2328 Section 16.4.1, "External path preferences". 

NSSA RFC 3101 was written according to RFC 2328 Section 16.4, "Calculating 
AS external routes", and its Section 16.4.1. RFC 3101's calculation, as 
defined in Section 2.5, is not a rehash of RFC 1587 Section 3.5. The only 
preference decision that prunes Type-5 and Type-7 LSAs is defined by RFC 
2328 Section 16.4.1. If RFC1583Compatibility is set to "enabled" no pruning 
occurs. After possible pruning Type-5 and Type-7 LSAs with equal prefix and 
metrics, but different forwarding addresses, are simply installed as equal 
cost paths. 

The tie breaker rules of RFC 3101 make no attempt to distinguish Type-5 and 
Type-7 LSAs unless they are functionally equivalent (i.e., same 
destination, cost and non-zero forwarding address). Its pecking order is 
based on the assumptions that "1" is preferred over "2" since 2 is most 
likely a translation of "1" (Note that under a steady state OSPF topology a 
type-5 translation would never be installed complements of the last 
paragraph of Section 2.5 Step (3)). By implication Type-7 LSAs with the 
P-bit clear have no preference over functionally equivalent Type-5 LSAs or 
Type-7 LSAs with the P-bit clear. Finally "3" is in keeping with OSPF RFC 
2328 Section 12.4.4.1 and NSSA RFC 3101 Section 2.4.

Hope this helps.

Pat

---

From: "James Huang" <[email-masked]>
Date: Tue, 9 Feb 2010 16:31:09 -0800

Hi Pat,

>-----Original Message-----
>From: Pat Murphy - (650)329-4044 [mailto:[email-masked]]
>Sent: Monday, February 08, 2010 4:40 PM
>To: [email-masked]
>Cc: James Huang
>Subject: Re: [OSPF] OSPF NSSA ABR behaviors
>
>James,
>
>Regarding,
>
>calculation is based on the old OSPF spec, RFC 1583. RFC 1587 attempted
>to define a pecking order for external routes of equal preference using
its
>tie breaker rules. I was not there at the time; but I suspect the
>authors were grappling with similar routing loops that have since been
resolved
>by RFC 2328 Section 16.4.1, "External path preferences".
>
>NSSA RFC 3101 was written according to RFC 2328 Section 16.4,
>"Calculating AS external routes", and its Section 16.4.1. RFC 3101's
calculation, as
>defined in Section 2.5, is not a rehash of RFC 1587 Section 3.5. The
>only preference decision that prunes Type-5 and Type-7 LSAs is defined
by RFC
>2328 Section 16.4.1. If RFC1583Compatibility is set to "enabled" no
>pruning occurs. After possible pruning Type-5 and Type-7 LSAs with
equal prefix
>and metrics, but different forwarding addresses, are simply installed
as
>equal cost paths.
>
>The tie breaker rules of RFC 3101 make no attempt to distinguish Type-5
>and Type-7 LSAs unless they are functionally equivalent (i.e., same
>likely a translation of "1" (Note that under a steady state OSPF
>topology a type-5 translation would never be installed complements of
the last
>P-bit clear have no preference over functionally equivalent Type-5 LSAs
>or Type-7 LSAs with the P-bit clear. Finally "3" is in keeping with
OSPF
>RFC 2328 Section 12.4.4.1 and NSSA RFC 3101 Section 2.4.
>

[James Huang] 
I have a few scenarios. 
Let's assume the non-zero forwarding address is X, which is part of a
subnet N, 
in the following discussion.

(Scenario 1) 
    Assuming multi-area network is not allowed (i.e. N is part of the
NSSA area only).
    There are two ABRs, R1 and R2, in this NSSA and 
    R1 is this router doing the route computation. 
    
    An ASBR R3 within the NSSA originates a type-7 P=1 E2-cost LSA.
    (case 1.1) R2 translates type-7 LSA to type-5 LSA without
aggregation:
          In this case, R1 may receive one <type-7, P=1, FA=X, ADV=R3>
LSA from NSSA 
          and another <type-5, FA=X, ADV=R2> LSA from the transit
topology.
          The routing table for N is intra-area associated with the
NSSA.  
          So the type-5 LSA will not pass the check in the last
paragraph of step (3) of sec 2.5.

    (case 1.2) R2 translates type-7 LSA to type-5 LSA with aggregation
(aggregating with 
          some other LSAs):
          In this case, R1 may receive one <type-7, P=1, FA=X, ADV=R3>
LSA from NSSA and 
          another <type-5, FA=0, ADV=R2> LSA from the transit topology.
          The routing table for N is intra-area associated with the
NSSA.  
          If the routing table for R2 is non-backbone intra-area and the
cost from R1 to N 
          and from R1 to R2 are the same, then R1 will install both LSAs
into the routing table.
  
    So neither (1.1) nor (1.2) requires the tie-breaking rule in sec 2.5
(6e).

(Scenario 2) 
    Assuming multi-area network is allowed. 
    Let's say, subnet N is part of this NSSA area 1 and another type-5
capable area 2.
    R1 is this ABR router in area 1 and R2 (an ASBR within area 1) 
    originates a <type-7, P=1, FA=X, ADV=R2, E2-cost> LSA.
    R3 (an ASBR within area 2) also originates a <type-5, FA=X, ADV=R3,
E2-cost> LSA.  
    This type-5 LSA may traverse the transit topology to reach R1. 

    There are two sub-cases here:
    (case 2.1) R1 is not connected to area 2: 
          The route for N is intra-area through the NSSA area 1
(intra-area route is preferred 
          over inter-area route). 
          So the type-5 LSA will not pass the last paragraph of step (3)
of sec 2.5.
          
    (case 2.2) R1 is also connected to area 2:
          The route for N is intra-area through the area 1 and area 2.
          In this case, the tie-breaking rule in sec 2.5 (6e) will be
used. 
          According to rule (6e), R1 should prefer the type-7, P=1,
FA=X, ADV=R2, E2-cost> LSA 
          over the <type-5, FA=X, ADV=R3, E2-cost> LSA.
          But if the type-7 LSA has P=0, R1 should prefer the type-5 LSA
over type-7 LSA.
          Why is it so?

I know that RFC 2328 does not support multi-area network. So case (2) is
not valid in that sense.
But I just cannot find other cases where the rule in sec 2.5 (6e) will
be used for tie-breaking
with good rationales.

Thanks,
James Huang