There are many types of OSPF LSAs.

There are many different types of LSAs that are exchanged between OSPF routers. The following are the types of OSPF LSAs that are relevant to IPv4 routing.

LSA Type名称
LSA Type1Router LSA
LSA Type2Network LSA
LSA Type3Network summary LSA
LSA Type4ASBR summary LSA
LSA Type5AS External LSA
LSA Type7NSSA External LSA
Table OSPF LSA Types

For each LSA, this section describes the router that generates it, the scope that is advertised, and the content that is included.

LSA Type1 Router LSA

LSA Type 1 Router LSA is the most basic LSA and is generated by all OSPF routers. The generated router LSAs are then flooded all within the area. The router LSA contains all the OSPF router link (OSPF enabled interface connections) information. The specifics of the link information include the type of link, cost, IP address, and router ID of the neighbor. However, what kind of information is included depends on the type of link. The figure below shows the information contained in a router LSA and how it is flooded.

Figure Router LSA
Figure Router LSA

LSA Type2 Network LSA

LSA Type 2 Network LSA is generated by the DR on each multi-access network. The DR is a router that represents a multi-access network. The network LSA shows the connection of an OSPF router on a multi-access network. Specifically, it contains the IP address of the DR, a list of routers connected to the multi-access network and the subnet mask of the multi-access network. network LSAs generated by the DR are flooded to all within the area.

Figure Network LSA
Figure Network LSA

LSA Type3 Network summary LSA

LSA Type 3 Network Summary LSA is the LSA that is generated when an OSPF network is divided into areas. The router that generates the network summary LSA is the ABR. The ABR advertises the network addresses of other areas that can be reached via the backbone area to the areas under its own control. At the same time, the ABR advertises the network address contained in the area under its own control to the backbone area.

Figure Network Summary LSA
Figure Network Summary LSA

There is not much need to know the detailed network diagram of other areas, and the network summary LSA is an overview of network addresses. One network summary LSA is generated for each network address. As more networks are included in other areas, the number of network summary LSAs generated by the ABR will also increase. So, we will configure route summary: by performing route summary in ABR, we can reduce the number of network summary LSAs generated by ABR.

LSA Type4 ASBR summary LSA

LSA Type 4 ASBR summary LSA is the LSA that is generated when a non-OSPF domain is connected. An ASBR summary LSA is also LSA generated by the ABR; the information contained in the ASBR summary LSA is the router ID of the ASBR and the metric used to reach the ASBR. The format of the Network Summary LSA and the ASBR Summary LSA is identical. The difference is that the ASBR router ID is written instead of the network address, and the subnet mask is “0.0.0.0”.

Figure ASBR summary LSA
Figure ASBR summary LSA

LSA Type5 AS External LSA

LSA Type 5 AS external LSA ( or simply “external LSA”) is the LSA that is created when a non-OSPF domain is connected. The AS external LSA is generated by the ASBR. External LSA allows network addresses from non-OSPF domains to be advertised within the OSPF domain. The external LSA contains the network address of the non-OSPF domain, the subnet mask and the metric and forwarding address to reach that network. Metric is the seed metric given at redistribution in ASBR. Depending on the metric type, the metric can be fixed or increasing. For metric type E2 (default), the metric for AS external routes is constant, and for metric type E1, the metric increases.

Also, external LSAs are flooded throughout the OSPF domain, except in stub areas.

Figure AS External LSA
Figure AS External LSA

LSA Type7 NSSA External LSA

The NSSA external LSA is generated by the ASBR in the NSSA. The ASBR in the NSSA floods the information of the network address of the non-OSPF domain into the NSSA. Since NSSA external LSA is flooded only within the NSSA, the NSSA ABR converts LSA type 7 to LSA type 5 and advertises it to the backbone area.

LSA type 7, like LSA type 5, contains the network address, subnet mask, next hop, and metric of the non-OSPF domain.

Figure NSSA External LSA
Figure NSSA External LSA

Summary of LSA Type

The following table summarizes the name, advertising router, advertised range, and contents for each LSA.

TypeNameAdvertising RouterAdvertised RangeContents
1Router LSAAll OSPF routersIntra areaRouter ID, Number of links, Detail of each links
2Network LSADRIntra areaIP address of DR, Subnet mask of multi access network, list of attached routers
3Network summary LSAABRIntra areaNetwork address, subnet mask, metric
4ASBR summary LSAABRIntra areaRouter ID of ASBR, metric
5AS External LSAASBROSPF domain(except stub areas)Network address of non-OSPF domain, Subnet mask, Forwarding address, metric
7NSSA External LSAASBR within NSSAWithin NSSANetwork address of non-OSPF domain, Subnet mask, Forwarding address, metric
Table Summary of LSA Type

Let’s look back again at the different types of LSA. LSA Type 1 and LSA Type 2 detail the network diagram in the area. LSA Type1 and Type2 describe that how many OSPF routers there are in the area and how they are interconnected. And LSA type 3 represents a network address contained within another area. For the other areas, “network address only”. LSA type 5 represents the network address of the part of the network that is performing routing other than OSPF, and ASBR, which is the boundary between OSPF and routing other than OSPF, is represented by LSA type 4.

The following figure shows a simple OSPF network example and the relationship between LSA types.

Figure OSPF Network example and LSA Types
Figure OSPF Network example and LSA Types

To be precise, LSA type 5 is not included in the LSDB for a particular area.

Related articles

How the OSPF works