Hello everybody,
My intention with this post is to show in an easy and simple way the OSPF LSA types. I hope it could make it easy and help better you understand. However, if someone finds some mistakes and has new information, please share it with us.
Before explaining the types of LSAs, let's review some concepts of the OSPF protocol.
Router Type
Routers are classified as Internal routers, ABRs, Backbone routers, or ASBRs by location in an AS.

Internal router: All interfaces on an internal router belong to the same OSPF area.
ABR (Area Border Router): An ABR connects the backbone area and non-backbone areas, and it can connect to the backbone area either physically or logically.
An ABR can belong to two or more areas, one of which must be a backbone area.
Backbone router: Backbone routers include internal routers in the backbone area and all ABRs.
At least one interface on a backbone router belongs to the backbone area.
ASBR (Autonomous System Boundary Router): An ASBR exchanges routing information with other ASs.
An ASBR may not reside at the boundary of an AS, and it can be an internal router or an ABR.
Route types are classified as intra-area, inter-area, Type 1 external, or Type 2 external routes. Intra-area and inter-area routes describe the network structure of an AS. Type 1 or Type 2 AS external routes describe how to select routes to destinations outside an AS.
Intra Area: Indicates routes within an area.
Inter-Area: Indicates routes between areas.
Type 1 external routes: Type 1 external routes have high reliability.
Type 2 external routes: Type 2 external routes have low reliability.
Area types in OSPF
Common area
By default, a router in a common area does not generate a default route.
Standard area: transmits intra-area, inter-area, and external routes.
Backbone area: connects to all other OSPF areas and transmits inter-area routes. The backbone area is area 0. Routes between non-backbone areas must be forwarded through the backbone area.
Stub area
It does not allow the entry of type 4 and 5 LSAs, so a router in a Stubby area does not know networks outside the OSPF domain (injected by ASBR). To have access to these networks, ABR starts to inject a default route in the Stubby area instead of disclosing LSAs 4 and 5.
A router in the stub area must learn AS external routes from an ABR. The ABR automatically generates a Type 3 LSA carrying a default route and advertises it within the entire stub area. Then the router can learn AS external routes from the ABR.
Totally stub area
Do not accept type 4 and 5 LSAs, Totally Stubby areas also do not accept type 3 LSAs.
A router in the totally stub area must learn AS external and inter-area routes from an ABR. After you configure a totally stub area, an ABR automatically generates a Type 3 LSA carrying a default route and advertises it within the entire totally stub area. Then the router can learn AS external and inter-area routes from the ABR.
NSSA (No So Stubby Area)
It is similar to the Stubby area (filters LSAs 4 and 5), but allows the existence of ASBR in the area, and the creation of LSA type 7.
An ABR does not translate Type 7 LSAs carrying a default route into Type 5 LSAs carrying a default route or flood them to the entire AS.
Totally NSSA
It does not allow the entry of type 3, 4, and 5 LSAs, but allows the creation of type 7 LSAs.
A router in the totally NSSA must learn AS external routes from an ABR. The ABR automatically generates Type 3 and Type7 LSAs carrying a default route and advertises them to the entire totally NSSA. Then AS external and inter-area routes can be advertised within the totally NSSA
After this summary, we will return to the focus of this post which is the types of LSAs
OSPF LSA Types
OSPF uses an LSDB (link state database) and fills this with LSAs (link-state advertisement). Instead of using 1 LSA packet, OSPF has many different types of LSAs.
Each router in an AS generates one or more types of LSAs, depending on the router's type. Multiple LSAs form an LSDB. OSPF encapsulates routing information into LSAs for transmission. Commonly used LSAs include:
· Summary-LSAs, including network-summary-LSAs (Type 3) and ASBR-summary-LSAs (Type 4)
LSA Type 1: OSPF Router LSA
Type 1 LSA is generated by all routers and is sent to all routers in the same area (no more than one area). In this LSA we have the list of all links connected to the router.
If a router has interfaces in more than one area, it generates type 1 LSAs for each area and maintaining LSDB - Link State Data Base, for each área.

LSA Type 2: OSPF Network LSA
Type 2 Network LSA is generated only by the DR(Designed Router) and only exists in multi-access networks (broadcast or non-broadcast), where DRs exist. All routers that are connected to the DR (connected to the multi-access network), the DR itself, and network prefixes and masks. Type 2 LSA does not move from one area to another.

LSA Type 3: OSPF Summary LSA
Type 3 LSA is generated by ABRs - Area Border Router and is injected into the neighboring area.
The routes with the indication “O IA” (OSPF Inter Área), are the routes from other areas learned through type 3 LSAs.
Despite its name, LSA type 3 does not summarize any networks when they are announced between areas (there is a way to summarize networks, precisely in ABR, but this is another matter)

LSA Type 4: OSPF ASBR Summary LSA and LSA Type 5: OSPF ASBR External LSA
In addition to inter and inter-area routes, we may have external routes
In the topology above, the ASBR router is redistributing IS-IS in OSPF, which makes it an ASBR - Autonomous System Boundary Router. And in this case, we have LSAs 4 and 5.
ASBR changes its type 1 LSA so that the ABR router identifies it as an ASBR. Because of this, the router (ABR) starts to generate LSA type 4, Summary ASBR LSA, disclosing how to get to ASBR to area 0 (and from this to the other areas).
In addition, the (ASBR) starts to send type 5 LSAs, Autonomous system external LSA, informing that it knows “external” networks/routes.
The external networks in the routing table are through the “O E1” and “O E2” indicators (external OSPF routes, type 1 and type 2).

LSA Type 6 – OSPF Group Membership LSA
The LSA type 6, Multicast OSPF LSA, as the name suggests, is used by MOSPF - Multicast OSPF, an OSPF extension that is little used and is not supported by Cisco routers.
LSA Type 7: OSPF Not So Stubby Area (NSSA) External LSA
Type 7 LSA is created when the ASBR type router exists in NSSA or Totally NSSA areas. This is because these areas do not allow type 5 LSA, so ASBR starts to generate type 7 LSA, which is converted into type 5 by ABR and then forwarded to area 0, and from there to the other normal areas.

LSA Type 8:
External Attributes LSA -OSPFv2-/ Link-Local LSA -OSPFv3-) in OSPFv2 (IPv4) are called External Attribute LSAs, and are used to transit BGP attributes through an OSPF network while BGP destinations are conveyed via LSA Type 5 packets, however, this feature isn’t supported by most routers. With OSPFv3 IPv6), LSA Type 8 is redefined to carry IPv6 information through the OSPF network.
Opaque-LSA (Type 9/Type 10/Type 11)
Provides a general mechanism for OSPF extension. Different types of LSAs are described as follows:
· Type 9 LSAs are advertised only on the network segment where the interface advertising the LSAs resides. Grace LSAs used in a graceful restart (GR) are Type 9 LSAs.
· Type 10 LSAs are advertised within an OSPF area. LSAs that are used to support traffic engineering (TE) are Type 10 LSAs.
· Type 11 LSAs are advertised within an AS but have not been used in practice.
References:
https://brainwork.com.br/2017/02/23/tipos-de-lsas-e-reas-ospf/
http://www.firewall.cx/networking-topics/routing/ospf-routing-protocol/1178-ospf-lsa-types-explained.html


