cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2343
Views
0
Helpful
0
Comments
Meddane
VIP
VIP

OSPF routing protocol is defined in four main RFCs.

RFC 1583 for OSPFv2 published March 1994

RFC 2328 for OSPFv2 published April 1998

For NSSA option, there are two RFCs that describe the NSSA Area

RFC 1587 published March 1994

RFC 3101 published January 2003

Now if we look at the Cisco Routers, by default the old RFC 1583 and the new RFC 3101 are enabled. It's very important to notice that Cisco prefers the OLD RFC 1583 while some vendors like Palo Alto prefer the new RFC 2328.

The coexistence and the compatibility between RFCs for OSPFv2 and RFCs for NSSA area will define different path selection.

First what's the difference between RFC 1583 and RFC 2328?

Basically, with the old RFC 1583, the path selection is based solely on the cost.

For RFC 2328, what's the change?

Per RFC 2328, the following rules indicate which paths are preferred when multiple intra-AS paths are available to ASBRs or forwarding addresses:

  1. Intra-area paths using non-backbone areas are always the most preferred.
  2. The other paths, intra-area backbone paths and inter-area paths, are of equal preference.

The intra-area route in a non-backbone area is preferred to reduce the overhead of the backbone area. The inter-area route and intra-area route in the backbone area have equal preference.

Now let’s jump to the RFCs for NSSA.

The old RFC 1587 for NSSA which can be currently turned on using the compatible RFC1587 command, says that if a router receive a Type-7 LSA and Type-5 for the same destination the cost to the forwarding address or ASBR are equal, the Type-5 LSA is always preferred, the OE1/OE2 routes is preferred than ON1/ON2 routes. This path selection rule is only valid if RFC 1583 is enabled (this the default on Cisco Routers).

 

See: RFC 1587, section 3.5 Calculating Type-7 AS External Routes:

 

When a type-5 LSA and a type-7 LSA are found to have the

same type and an equal distance, the following priorities

apply (listed from highest to lowest) for breaking the tie.

 

Any type 5 LSA.

A type-7 LSA with the P-bit set and the forwarding address non-zero.

Any other type-7 LSA.

We can conclude that RFC 1587 is compatible ONLY with RFC 1583.

Now for the new RFC 3101, the order is inverted, in others words, if a router receive a Type-7 LSA and Type-5 for the same destination the cost to the forwarding address or ASBR are equal, the Type-7 LSA is always preferred, the ON1/ON2 routes is preferred than OE1/OE2 routes.

See : RFC 3101, Section: 2.5 Calculating Type-7 AS External Routes says:

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.

 

So basically RFC 3101 says that the ON1/ON2 route through the non-backbone (NSSA AREA) is preferred that the OE1/OE2 route through the backbone area or regular area. At the same time, RFC 2328 says the intra-area route in a non-backbone area is preferred than the intra-area route in a backbone area.

 

Therefore RFC 3101 is compatible with both 1583 and 2328.

 

For RFC 2328, when we have an NSSA area, based on the definition above (the intra-area route in a non-backbone area is preferred than the intra-area route in a backbone area).

We can formulate the definition as follow: the ON2 routes learned through an NSSA area is always preferred because simply the best path to reach the ASBR is through the non-backbone (NSSA area). While RFC 1587 tell us that the OE route is preferred than ON2 route, therefore both RFC 1587 and RFC 2328 cannot coexist, if they coexist RFC 2328 takes precedence over RFC 1587.

 

Now what if we have multiple ASBRs reachable through different non-backbone areas?

 

If you read the RFC 3101 The OSPF Not-So-Stubby Area (NSSA) Option, you will find that if RFC 1583 is disabled, when a router has multiple entries in the routing table to the same destination from the same ASBR and this ASBR is reachable through different non-backbone area, it will lookup the largest area id as the tie breaker, the route learned through the highest area id will be chosen.

 

From RFC 3101 section 2.5 Calculating Type-7 AS External Routes

 

          If the forwarding address is set to 0.0.0.0 then packets

          should be sent to the ASBR itself.  If the LSA is Type-5, from

          among the multiple non-NSSA routing table entries for the ASBR

          (both NSSA and non-NSSA ASBR entries might exists on an NSSA

          border router), select the preferred entry as follows:

 

            If RFC1583Compatibility is set to "disabled", prune the set

            of routing table entries for the ASBR as described in OSPF

            Section 16.4.1.  In any case, among the remaining routing

            table entries, select the routing table entry with the least

            cost; when there are multiple least cost routing table

            entries the entry whose associated area has the largest OSPF

            Area ID (when considered as an unsigned 32-bit integer) is

            chosen.

 

When we say RFC 1583 compatibility is set to "disabled”, this means that RFC 2328 is enabled, below you can see that RFC 2328 confirms what RFC 3101 said about the largest area id as tie breaker.

 

From RFC 2328 section 16.4.  Calculating AS external routes

 

If the forwarding address is set to 0.0.0.0, packets should

            be sent to the ASBR itself. Among the multiple routing table

            entries for the ASBR, select the preferred entry as follows.

            If RFC1583Compatibility is set to "disabled", prune the set

            of routing table entries for the ASBR as described in

            Section 16.4.1. In any case, among the remaining routing

            table entries, select the routing table entry with the least

            cost; when there are multiple least cost routing table

            entries the entry whose associated area has the largest OSPF

            Area ID (when considered as an unsigned 32-bit integer) is

            chosen.

 

The difference between RFC 1583 and RFC 2328 about how to choose the best route among multiple external routes, is discussed in this section. For multiple ASBRs reachable through different non-backbone area, the best external route is selected based on the cost.

 

From RFC 1583 Section 16.4.6

 

            Otherwise, compare the cost of this new AS external path to

            the ones present in the table.  Type 1 external paths are

            always shorter than type 2 external paths.  Type 1 external

            paths are compared by looking at the sum of the distance to

            the forwarding address and the advertised type 1 metric

            (X+Y).  Type 2 external paths are compared by looking at the

            advertised type 2 metrics, and then if necessary, the

            distance to the forwarding addresses.

 

            If the new path is shorter, it replaces the present paths in

            the routing table entry.  If the new path is the same cost,

            it is added to the routing table entry's list of paths.

 

OSPF with RFCs is a big topic especially when we analyze the path selection.

Redouane MEDDANE

 

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: