OSPF Area Types – Different Areas in OSPF are used to create smaller fault domains. There are two OSPF area types in total.
OSPF Backbone area and OSPF non-backbone area
Backbone area in OSPF is Area 0. OSPF prevents loop by using backbone area concept.All the non-backbone areas should be connected to the Backbone area.
There are many Non-Backbone OSPF Area types. These are; Normal Area, Stub, Totally Stub, NSSA and Totally NSSA Areas.
In this article I will explain the non-backbone OSPF areas from the design point of view and share some caveats about the OSPF design.
If you haven’t read OSPF LSA Types article, click here
Figure – 1 OSPF Area Types
Regular OSPF Non-Backbone Area
If the OSPF Area is not an Area 0 (OSPF Backbone Area) and not also OSPF Stub, Totally Stub, NSSA or Totally NSSA Area, then it is regular OSPF non-backbone area.
If you have two areas in your network one has to be Area 0 and other area can be any other number.
Topology information which is the connection information among the routers is not sent between the OSPF Areas.
Figure – 2 OSPF Area and LSA Types
In the topology above Area 10 is a regular non-backbone area. Regular OSPF areas allow all the LSA Types into the Area.
There is no auto summarisation between the areas thats why reachability information by default is sent between OSPF backbone area and the regular OSPF non-backbone areas.
In the above topology, Area 30 has an ABR connected to the EIGRP domain. The subnets 192.168.0.0/24 and 192.168.1.0/24 are sent to the Area 10 since it is a regular OSPF area.We will see that this will be not the case with other OSPF non-backbone areas.
OSPF Stub Area
In the topology above Area 20 is OSPF Stub Area. Stub Area as you can see from the figure 1 as well, don’t allow Type 4 and Type 5 LSAs. Only Type 3 LSA is allowed into OSPF Stub Area.
Type 4 LSA is known as ASBR Summary, Type 5 LSA is known as OSPF External LSA and both are not allowed into the OSPF Stub Area.
Thats why 192.168.0.0 and 192.168.1.0 subnets which come from the EIGRP domain cannot be learned by the Area 20 routers. Instead those networks are reached via default route. Default route is sent into the OSPF stub area as OSPF Type 3 LSA which is Inter-Area OSPF LSA.
OSPF Totally Stub Area
Imagine that Area 20 is a OSPF Totally Stub Area. Then it wouldn’t allow Type 3 LSA in addition to Type 4 and Type 5 LSA as well.
If the requirement is higher scalability then OSPF Totally Stub Area provides better scalability compare to OSPF Stub Area.
One thing you should keep in mind that, when the OSPF area becomes Stub, Totally Stub, NSSA and totally NSSA area, chance of the sub optimal routing in the network increases.
Figure – 3 OSPF LSA and Area Types
OSPF NSSA Area
Redistribution into the OSPF Stub area is not allowed. But if the requirement is to redistribute into the OSPF Stub area, then OSPF Not-So-Stubby Area is used.
OSPF NSSA area allows route to be redistributed.
Redistributed routes appear in the OSPF NSSA area as Type 7 LSA.
Type 7 LSA is translated by the OSPF ABR to the OSPF Type 5 LSA. If the are more than one OSPF NSSA ABRs, the router which has higher Router ID does the translation only.
Default route is not sent by default to the OSPF NSSA area. You may manually send it into the OSPF NSSA area on the ABR though.
Type 7 LSA is translated to the Type 5 LSA and send to the all routers in the OSPF domain. But Type 5 LSA is not sent to the OSPF NSSA Area. Since Type 5 LSA is not allowed, Type 4 LSA is not allowed too.
OSPF Totally NSSA Area
If the requirement is redistribution into the OSPF Stub area with a better scalability than the OSPF NSSA area then the solution is OSPF Totally NSSA Area.
In OSPF Totally NSSA Area, in addition to Type 4 and Type 5 LSA, Type 3 LSA is not allowed as well. Default route is sent by the NSSA ABR into NSSA Totally Stub Area which is different than OSPF NSSA Area.
If you are familiar with IS-IS routing protocol, Totally Stub Area is similar to IS-IS Level 1 domain. In IS-IS level 1 domain, IS-IS LSPs are not allowed but only ATT bit of L1 LSP is allowed. Since IS-IS Level 1 domain allows redistribution as well, all these behavior can be considered the same with OSPF Totally NSSA area.
Conclusion : OSPF Areas are used for scalability. If you don’t have valid reason such as 100s of routers, or resource problems on the routers or on the network, don’t use multiple areas. It just increases the complexity.
Last but not least, OSPF NSSA area in general is used at the Internet Edge of the network since on the Internet routers you don’t need to have all the OSPF LSAs yet still redistribution of selected BGP prefixes are common.