As we already know OSPF has different area types (normal, stub, totally stub, not-so-stubby/nssa and nssa totally stub) and the LSAs permitted inside them varies accordingly.

In OSPF the default-route is treated differently. By default OSPF does not allow a default-route from any other domain to be advertised/redistributed into its domain. We need to configure “default-information originate” command on ASBR under OSPF process to generate a default route towards OSPF domain if it has one already in its RIB. If ASBR or ABR does not have a default route and we still want to generate one then we need to configure “default-information originate always” under OSPF.

  1. In a normal OSPF area, when an ABR/ASBR generates a default route, it pushes the route as external type2 aka E2 route.
  2. In a stub & totally-stub area, the ABR pushes the default route as type3 aka OIA.
  3. In a NSSA, when an ABR/ASBR generates a default route, it pushes the route as nssa-external type2 aka N2 route.
  4. In a NSSA-totally-stub area, when an ABR generates a default route, it pushes the route as type3 aka OIA where as ASBR pushes as nssa-external type2 aka N2 route.

Point 1 & 2 is pretty much straight forward. In normal area all LSA types are allowed and ASBR or ABR generates the default route as LSA type 5 (E2) and it gets propagated to all the normal area as E2 route. In stub and totally-stub areas LSA type 5 is not allowed hence ABR generates a default route as LSA type 3 (OIA).

One might be thinking, as in NSSA areas LSA type 5 is not allowed hence a type 5 (E2) route cannot be pushed to NSSA area and ABR converts the LSA type 5 to type 7 and propagates to NSSA area? But this is not what actually happens.  ABR never converts any LSA Type 5 to Type 7. There is no concept of converting Type 5 to Type 7.

This is where it gets interesting.

Let’s focus our discussion on default route LSA types in NSSA area.

OSPF default-route

**NOTE:- In NSSA the ABR does a dual role of ABR & ASBR. In this article I will only call it as ABR to distinguish with other ASBR.

In the topology:-   IOU1 is an ASBR in Area 0 generating an E2 route. IOU2 is an ABR, IOU3 is an internal router in NSSA area, IOU5 is ASBR in NSSA area, IOU4 is a stub router.

Router OSPF config of IOU2

IOU2#show run | sec r o
router ospf 1
 router-id 2.2.2.2
 area 2 stub
 area 3 nssa
 network 2.2.2.2 0.0.0.0 area 0
 network 10.10.12.0 0.0.0.255 area 0
 network 10.10.23.0 0.0.0.255 area 3
 network 10.10.24.0 0.0.0.255 area 2
IOU2#

Area 2 is defined as stub area, so it is getting a type 3 default route from ABR (IOU2 here).

Let’s check whether it is getting into Area 3 or not.

<Output of IOU3>

IOU3#show ip route
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area 
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
       a - application route
       + - replicated route, % - next hop override

 Gateway of last resort is not set
 
      1.0.0.0/32 is subnetted, 1 subnets
O IA     1.1.1.1 [110/21] via 10.10.23.2, 00:03:41, Ethernet1/0
      2.0.0.0/32 is subnetted, 1 subnets
O IA     2.2.2.2 [110/11] via 10.10.23.2, 00:03:41, Ethernet1/0
      3.0.0.0/32 is subnetted, 1 subnets
C        3.3.3.3 is directly connected, Loopback3
      4.0.0.0/32 is subnetted, 1 subnets
O IA     4.4.4.4 [110/21] via 10.10.23.2, 00:03:41, Ethernet1/0
      5.0.0.0/32 is subnetted, 1 subnets
O        5.5.5.5 [110/11] via 10.10.35.5, 00:22:22, Ethernet0/0
      10.0.0.0/8 is variably subnetted, 6 subnets, 2 masks
O IA     10.10.12.0/24 [110/20] via 10.10.23.2, 00:03:41, Ethernet1/0
C        10.10.23.0/24 is directly connected, Ethernet1/0
L        10.10.23.3/32 is directly connected, Ethernet1/0
O IA     10.10.24.0/24 [110/20] via 10.10.23.2, 00:03:41, Ethernet1/0
C        10.10.35.0/24 is directly connected, Ethernet0/0
L        10.10.35.3/32 is directly connected, Ethernet0/0
      55.0.0.0/32 is subnetted, 1 subnets
O N2     55.55.55.55 [110/20] via 10.10.35.5, 00:21:52, Ethernet0/0
IOU3#

Under normal circumstances, NSSA ABR does not generate a default route towards NSSA area because of following reasons.

1.      As NSSA is also connected to a non OSPF network, OSPF process expects the NSSA area has an exit route through its ASBR.

2.      OSPF process does not want to be a transit area between non OSPF processes which might cause a loop.

But if the network architect wants a default-route for his NSSA area, then he can generate that from ABR or ASBR. You got it right. To generate a default route into NSSA area we need a special command. The magic command for my topology will be “area 3 nssa default-information-originate”. Remember it is not same as “default-information originate always”.

IOU2#show run | s r o
router ospf 1
 router-id 2.2.2.2
 area 2 stub
 area 3 nssa default-information-originate
 network 2.2.2.2 0.0.0.0 area 0
 network 10.10.12.0 0.0.0.255 area 0
 network 10.10.23.0 0.0.0.255 area 3
 network 10.10.24.0 0.0.0.255 area 2
IOU2#

After configuring “area 3 nssa default-information-originate” in ABR, now I can see default route on IOU3.

IOU3#show ip route 0.0.0.0 
Routing entry for 0.0.0.0/0, supernet
  Known via "ospf 1", distance 110, metric 1, candidate default path, type NSSA extern 2, forward metric 10
  Last update from 10.10.23.2 on Ethernet1/0, 00:00:15 ago
  Routing Descriptor Blocks:
  * 10.10.23.2, from 2.2.2.2, 00:00:15 ago, via Ethernet1/0
      Route metric is 1, traffic share count is 1

IOU3#

As you noticed, IOU3 received a type 7 (N2) default route from ABR as type 5 (E2) is not allowed inside NSSA area.

Why the default route is injected as type7 (N2) in NSSA area but not a type3 (OIA) like in for stub areas?

The answer is NSSA area can be connected to non OSPF external network. It might get a default route from the ASBR as well. The ASBR will generate the default route as type7 (N2). Now if ABR generates a default route as type3 (OIA) then the OIA route will be preferred over N2. This situation will lead to a sub optimal routing. To avoid this, ABR generates type7 default route.

Of course when both ABR and ASBR generates the default route of their own, then routers inside the NSSA area select/install the best one by calculating cost to reach them (least cost wins).

Now let’s see what happens in NSSA-totally stub area.

To make the area 3 as NSSA-totally stub area, I need to configure “area 3 nssa no-summary” on ABR (IOU2 here).

IOU2#show run | s r o
router ospf 1
 router-id 2.2.2.2
 area 2 stub
 area 3 nssa default-information-originate no-summary
 network 2.2.2.2 0.0.0.0 area 0
 network 10.10.12.0 0.0.0.255 area 0
 network 10.10.23.0 0.0.0.255 area 3
 network 10.10.24.0 0.0.0.255 area 2
IOU2#

Let’s check if there is any change in default route on IOU3 and IOU5.

IOU3#show ip route 0.0.0.0
Routing entry for 0.0.0.0/0, supernet
  Known via "ospf 1", distance 110, metric 11, candidate default path, type inter area
  Last update from 10.10.23.2 on Ethernet1/0, 00:01:57 ago
  Routing Descriptor Blocks:
  * 10.10.23.2, from 2.2.2.2, 00:01:57 ago, via Ethernet1/0
      Route metric is 11, traffic share count is 1
IOU3#

IOU5#show ip route 0.0.0.0
Routing entry for 0.0.0.0/0, supernet
  Known via "ospf 1", distance 110, metric 21, candidate default path, type inter area
  Last update from 10.10.35.3 on Ethernet0/0, 00:00:08 ago
  Routing Descriptor Blocks:
  * 10.10.35.3, from 2.2.2.2, 00:00:08 ago, via Ethernet0/0
      Route metric is 21, traffic share count is 1
IOU5#

Did you notice the default summary route injected by the ABR is now a type3 (OIA).

So the question here is why in nssa area the ABR pushes a type7 default route but in nssa-totally stub area, the ABR pushes a type3 default route.

Earlier I have already explained about the type7 default route in nssa area.

In nssa-totally stub area, the inter area routes (routes from other OSPF areas) are prevented and substituted by a default route. If ABR generates a type7 default route then there is chance that the routers inside NSSA area may get a better cost for ASBR generated default route. In this scenario the routers in NSSA area will follow sub-optimal path (via ASBR towards non OSPF domain) to reach OSPF inter area routes.

So to answer to the question is, ABR generates a type3 default route to be more preferred in NSSA area and routers will send the traffic towards ABR. This traffic includes for OSPF and non OSPF routes as well.

Diagrammatic representation of the LSA types (apart from type 1 & type 2) generated by ABR in NSSA area.

OSPF default-routes

 

 

 

 

 

Advertisements

2 thoughts on “Default route (0.0.0.0/0) LSA Types in different OSPF areas

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s