5.1 Multiple OSPF Areas
5.1.3 OSPF LSA and area types
Multiarea OSPF is scalable because a router's link-state database can include multiple types of LSAs. DRs (Designated Routers) and routers that reside in multiple areas or autonomous systems use special LSAs to send or summarize routing information. The OSPF LSA types are described in Figure

OSPF Area Types
The characteristics that you assign to an area control the type of route information that it can receive. For example, you may want to minimize the size of routing tables in an OSPF area, in which case you can configure the routers to operate in an area that does not accept external routing information (Type 5 LSAs).
Several area types are possible, some of which are shown in Figure :

  • Standard area - A standard area can accept link updates and route summaries.
  • Backbone area (transit area) - When interconnecting multiple areas, the backbone area is the central entity to which all other areas connect. The backbone area is always Area 0. All other areas must connect to this area to exchange route information. The OSPF backbone has all the properties of a standard OSPF area.
  • Stub area - A stub area is an area that does not accept information about routes external to the autonomous system (that is, the OSPF internetwork), such as routes from non-OSPF sources. If routers need to reach networks outside the autonomous system, they use a default route. A default route is noted as 0.0.0.0/0.
  • Totally stubby area - A totally stubby area is an area that does not accept external autonomous system (AS) routes and summary routes from other areas internal to the autonomous system. Instead, if the router needs to send a packet to a network external to the area, it sends it using a 0.0.0.0/0 default route. Totally stubby areas are a Cisco proprietary feature.
  • Not-so-stubby area (NSSA) - An NSSA is an area that is similar to a stub area but allows for importing external routes as Type 7 LSAs and translation of specific Type 7 LSA routes into Type 5 LSAs. 

A key difference among these OSPF area types is the way they handle external routes. External routes are injected into OSPF by an ASBR. The ASBR may learn these routes from RIP or some other routing protocol.
You can configure an ASBR to send out two types of external routes into OSPF: Type 1 (denoted in the routing table as E1) and Type 2 (E2). Depending on the type, OSPF calculates the cost of external routes differently, as follows:

  • E1 - If a packet is an E1, then the metric is calculated by adding the external cost to the internal cost of each link that the packet crosses. You use this packet type when you have multiple ASBRs advertising a route to the same autonomous system.
  • E2 - If a packet is an E2, then the packet will always have the external cost assigned, no matter where in the area it crosses (this is the default setting on ASBRs). You use this packet type if only one router is advertising a route to the autonomous system. Type 2 routes are preferred over Type 1 routes unless two equal cost routes exist to the destination.

For example, consider the network shown in Figure .

In this network, RTB will receive external RIP routes, including 9.0.0.0/8 from RTA. By default, RTA is sending external routing information using Type 2 metrics. Thus, when RTB sends this route to RTC, the metric for the external route remains the same (in this case, 20). Click on the topology of Figure to compare RTB's table with RTC's table.

Now, if you configure RTA to use a Type 1 metric with external routes, OSPF will increment the metric value of the external route according to its standard cost algorithm. You can see that, in the show ip route output in Figure , the exact same routes now have very different metrics in each table. RTB now increments the external route's metric.