strange ospfv3 behavior


I'm working on a sample mini-lab that I've created for OSPFv3. what is strange about OSPFv3 is that the ABR (R5 in my case) gets two N2 routes from 2 ASBR routers in which R5 connects to the ASBR directly with GE interface. but R5 just translate one of N routes despite I have never suppress type7 to type5 translation anywhere in the network. the forward-addresses of both N routes are reachable and were placed in the routing table on every router. just after disabling the first route, the second route are translated and sent by the ABR. As long as I know and see, ABR (with the highest ID) must translate all of the N routes that have reachable forward-address. so why is that? 




  • Hi Temaz and all,

    Terrific topology, puts me to shame.

    As you know from other thread, I'm not very good at this.  But as an exercise, I looked at RFC 5340.  It seems to use AS path calculation algorithm in RFC 3101.  RFC 3101 draws on RFC 2328.  Three RFCs being used to explain this algorithm for OSPFv3.  I've added my comments on how that decision step is operating.  Please affirm or correct.

    (Need to test below using more examples).

    RFC 5340.

    4.8.5.  Calculating AS External and NSSA Routes

       The IPv6 AS external route calculation proceeds along the same lines

       as the IPv4 calculation in Section 16.4 of [OSPFV2] and Section 2.5

       of [NSSA], with the following exceptions:

       o  AS Boundary Router (ASBR) and forwarding address selection will

          proceed the same as if RFC1583Compatibility is disabled.

          Furthermore, RFC1583Compatibility is not an OSPF for IPv6

          configuration parameter.  Refer to Appendix C.1.

    Your example:

    R5 receives:

    Two NSSA-Type LSAs of type 2

    Each with equal path cost

    Each from different ASBR

    Which LSAs are selected?


    RFC 3101 secition 2.5


    AS external path -- path that reaches an external prefix

    "N" -- destination prefix

    Begin:  RFC 3101 secition 2.5

    Insert in ospf route table the first received LSA to reach N.

    Examine next received LSA.

    Compare the AS external path described by the LSA with the existing paths in N's routing table entry.  -- is "N" in ospf route table; take the newly received LSA and compare for preference:

    (a) intra-area, inter-area, and AS external paths -- if N's table entry an intra-area or inter-area path, then ignore any LSA7s of LSA5s you might receive.  

    -- in our example, as both are AS external paths -- no difference 

    (b) type 1 external over type 2 external paths -- if N's table entry is an AS external path, then compare external path types; prefer 1 over 2.


    An existing E1 in table would be preferred over an N2

    an N2 is equal preference with an E2

    But in our case, both are LSAs of type 2.  -- no difference

    (c)  "preferred paths based on the intra-AS paths to the ASBR/forwarding addresses". No longer looking at prefix "N".  Looking at route table entries leading to forwarding address  (next hop) to reach N.

    Within ospf route table:  non-backbone intra-area preferred over backbone intra-area and inter-area

    Both NSSA-Type LSAs are non-backbone intra-area. -- no difference

    (d)  if still no prefered LSA, then use cost of paths to "N" as tie-breaker.  

    Both LSA paths have same cost. -- no difference

    (e) If the current LSA is functionally the same as an

                  installed LSA (i.e., same destination, cost and non-zero

                  forwarding address) then apply the following priorities in

                  deciding which LSA is preferred:

                     1. A Type-7 LSA with the P-bit set.

                     2. A Type-5 LSA.

                     3. The LSA with the higher router ID. <<<< looks like this guy


    R5 selects the LSA with higher RID (?)  Need to lab and check.

  • Randy is exactly right


    I just labbed this one up quickly, here is the topolgy with some IP addresses:




    If multiple equal N2 routes exists (equal cost, P-bit set, non-zero forwarding address) the tie breaker will indeed be the router ID


    Here is the output as seen from R5 on the N2 route 2001:200:1::13/128 in area 2


    And here is the same prefix after the 7-to-5 translation into area 0


    And just for good measure, here is the route as seen by router 7


    So as Randy reasoned, in case of multiple equal N2 routes, only the "best" one (in this case simply decided by a higher router ID) will be translated into a type 5 LSA.

  • Hi All, pretty sharp posts Martinb and Temaz.  Thank you for your postings and lab work.  I have to rent lab time to do testing.  Today, been working on algorithms in RFC 2328.  Goal is to reword the decision steps and construct logic diagram.  I'm kind of a visual guy.  Be nice after finishing with algorithms, to make a list of LSAs that would trigger each step of algorithm (to test logic each step of the way).

  • If the translator ABR selects only the best of N routes and translate/send only the selected route into the ospf normal areas, we can say that ospf bahaves like distance vector protocols, like BGP and EIGRP. so is it an ospf rule or not, I'm not sure enough, but it prevents ospf routers inside normal areas to see the alternative E routes with the forward-address that may be closer than the selected route. any ideas?


    Timaz and All,

    fully agree with what you are saying, and I too have reservations about all
    this.  As such, below is ospf algorithm
    reworded according to my interpretation. 
    Please affirm or correct. 
    According to this model normal area routers could end up using
    suboptimal paths. 

    to check? 

    your model above, and using the algorithm below, R5 selects R6 (higher RID; section ), and translates to LSA5.  R8
    will select this LSA5 (LSA5's FA is R6; only entry) and send traffic directly
    to R5.

    R2 will select R4 (compare LFA5 with LSA7; forwarding path is NSSA intra-area
    non-backbone and is preferred over intra-area backbone; section 2.5.6.c ), (compare 2 LSA7's; least cost to R4; section  2.5.6.d) and will send traffic
    directly to R4.  (lab this)

    what about R7?  1) R7 selects LSA5's FA
    to R6; 2) R7's topology is balanced across R8 and R2 to reach R6's FA; 3)
    traffic flows two paths: 

    a)  R7-R8-R5-R6, and b) R7-R2-R4.  Check whether this is true.

    it is, then we know that the algorithm is consistent with results.  Move on testing other topologies. 

    not, then back to the drawing board.

    RFC5340 refs RFC3101 for Algorithm

    RFC 3101 Section 2.5
    Calculating Type-7 AS External Routes


    For an LSA7 being


    2.5 (1) and 2.5 (2)
    are validity checks of LSA7

    2.5 (3) LSA7 is
    placed in one of two classes:  FA = or FA = <IPv6 address>

    2.5 (4) Step defines
    X and Y costs, using OSPF route table and LSA

            X is cost to reach either FA or ASBR
    (ASBR when FA = from route table

            Y is external cost in LSA7

    2.5 (5) If no route
    to "N" exists in OSPF Route Table, then insert this LSA7.

            Step also explains how to construct


    2.5 (6) Else, an
    N-entry exists.  N-entry in route table
    == {O, O IA, E1/2, N1/2}

    Compare LSA7 with
    N-entry for Preference.

    (Contrast with BGP
    BestPath algorithm.  Where BestPath ==
    N-entry, and BGP update == LSA7.)


    Compare LSA7 with


    2.5 (6) (a)  IF: existing N-entry is "O" or
    "O IA"

                    Prefer N-entry


    2.5 (6) (b)  ELSE: 
    existing N entry is {E1,E2,N1,N2} and LSA7 is {N1,N2}

                  IF: LSA7 type-1 and N-entry type-2

    Prefer LSA7

                    ELSE IF: LSA7 type-2 and
    N-entry type-1

                       Prefer N-entry

                  ELSE: both are either type-1 or



    2.5 (6) (c)  Using route table, compare paths to reach FA
    or ASBR

                  Path types: {(intra-area, non-backbone),
    (intra-area, backbone),  inter-area}

                    Rule:  "intra-area, non-backbone" is
    preferred over all others.

    IF:  LSA7's is "intra-area
    non-backbone" and N-entry's is not

                    Prefer LSA7

                 ELSE IF:  N-entry is "intra-area
    non-backbone" and LSA7's is not

                    Prefer N-entry  Note: 
    LSA7s are always intra-area non-backbone



    2.5 (6) (d)  ELSE:  prefer least cost to reach "N"


    2.5 (7) (e) 1.  Prefer LSA7 with P-bit set

    Prefer LSA5  (N-entry is from an

    Prefer the higher router ID of LSA originator




  • This is not OSPFv3 specific, it is the same as for OSPFv2; basically if a router receives multiple N1 (or N2) entries in the database for the same prefix ( so multiple ASBRs in the NSSA aea), and on the cost calculation all are equal, all end up in the routing table of that router; now if this router is also an ABR and the 7/5 translator, it CANNOT translate all type7 entries into type5, it has to pick up only one, as for Type7/Type5 LSAs, it is distance-vector behaviour, where even if the router installs multiple entries in the routing table, to its downstream neighbors it will advertise out ONLY one; and because the only non-variable tie-breaker between the multiple N entries for the same prefix is the ASBR router-id, this is used as a tie-breaker and the highest router-id entry wins the selection for 7/5 translation.

Sign In or Register to comment.