OSPF LSA Types and their Functions
In this blog, we will understand the OSPF LSA types and how OSPF uses (LSAs) are exchanged, including how the information is exchanged in the network topology between routers.
A router's Link-State Database stores LSAs that are received (LSDB). The Shortest Path First (SPF) algorithm is used by OSPF to determine the optimum routes for each network once the LSDBs between routers are in sync. It is crucial to realise that LSAs are route-related data sent inside Link State Update (LSU) packets.
Therefore, it is essential for any network engineer to comprehend how LSAs are kept within an LSU. Let's dig deep into OSPF LSA types, but before that, we must have a basic understanding of Link State Advertisement (LSA).
What is LSA in OSPF?
LSA stands for "Link State Advertisement" in OSPF (Open Shortest Path First). In OSPF, routers exchange information about the network topology by sharing LSAs. LSAs are packets containing details about the router's interfaces, neighboring routers, and network links.
Each router in an OSPF network generates LSAs and floods them to all other routers within the same OSPF area. LSAs allow routers to build a synchronized view of the network, calculate shortest paths, and maintain routing tables for efficient packet forwarding.
OSPF LSA Types - Quick Overview
Here is a quick overview of OSPF LSA types that we will be discussing further -
|LSA Type 1||OSPF Router LSA|
|LSA Type 2||OSPF Network LSA|
|LSA Type 3||OSPF Summary LSA|
|LSA Type 4||OSPF ASBR Summary LSA|
|LSA Type 5||OSPF ASBR External LSA|
|LSA Type 6||OSPF Group Membership LSA|
|LSA Type 7||OSPF Not So Stubby Area (NSSA) External LSA|
|LSA Type 8||OSPF External Attributes LSA (OSPFv2) / Link Local LSA (OSPFv3)|
|LSA Type 9||OSPF Link Scope Opaque (OSPFv2) / Intra Area Prefix LSA (OSPFv3)|
|LSA Type 10||OSPF Area Scope Opaque LSA|
|LSA Type 11||OSPF AS (Autonomous System) Scope Opaque LSA|
Functions of LSAs in OSPF
To create multiple paths throughout the network, OSPF uses LSA exchanges in the following activities:
- Discovering neighbors
- Electing a DR and BDR
- Establishing adjacencies and synchronizing databases
LSAs are the building blocks of the OSPF LSDB. Individually, LSAs act as database records, and when combined, they describe the entire topology of an OSPF area. There are several types of OSPF network LSAs, but not all are in use.
OSPF LSA Types
Let's discuss each OSPF LSA type one by one.
OSPF LSA Type 1 - OSPF Router LSA
IRs generate these types of LSA. They carry the information of all directly connected routes, and it always stays within the area. You will find the router-id of the originating router in the link-state id field. Once routing is done on the OSPF router, it generates the Type-1 LSA; you can use this command to verify the LSA.
#SHOW IP OSPF DATABASE
And you'll get an LSA Type-1 like this in the database table of OSPF.
OSPF LSA Type 2 - Network LSA
The DR generates it on a multi-access network segment and always stays within the area when the neighborship is formed between two routers. Same you can verify in the database table of OSF.
Using a summary prefix, the ABRs produce it into all other areas in order to summarise the area to which it is directly connected and to promote inter-area router information to other areas to which it is connected.
Summary LSAs are further classified into 2 types:
- Type 3 LSA
- Type 4 LSA
OSPF LSA Type 3 - Summary LSA
Routes to destinations in other areas within the OSPF network, i.e., inter-area destinations (O-IA). Basically, when multi-areas in OSPF are configured then, only this LSA type is generated in OSPF.
OSPF LSA Type 4 - ASBR Summary LSA
LSA Type 5 (ASBR External LSA) packets are created by the ASBR in order to advertise externally redistributed routes into the OSPF's AS. They describe the routes to the destinations external to the OSPF network. These LSAs are forwarded to all the connected and redistributed areas.
OSPF LSA Type 5 - AS External LSA
The ASBR generates LSA Type 5 (ASBR External LSA) packets to advertise external redistributed routes into the OSPF's AS. They describe the routes to the destinations external to the OSPF network. These LSAs are forwarded to all the connected and redistributed areas.
OSPF LSA Type 6 - Multicast OSPF LSA
Not supported and not used by OSPF. Cisco iOS doesn't support this LSA type. They use (PIM) Protocol independent Multicast.
OSPF LSA Type 7 - NSSA LSA
It is produced by an ASBR inside an NSSA to characterize routes that have been redistributed there. As LSA 7 exits the NSSA, it is converted into LSA 5.
NSSA area routers will be type 7 LSAs, but for other areas (other than NSSA), ABRs will convert them into type 5, which are easily understandable and acceptable in these areas.
|LSA Types||Advertising Router||Contents of LSA|
|Type – I (Router LSA)||OSPF router||Topology and routing info.|
|Type – II (Net LSA)||DR||Topology and routing info.|
|Type – III (Summary LSA)||ABR||Inter-area routing information|
|Type – IV (ASBR Sum. LSA)||ABR||ASBR’s router-ID|
|Type – V (AS External LSA)||ASBR||AS External routing information|
|Type – VI (Multicast LSA)||-||-|
|Type – VII (NSSA-LSA)||ASBR||External routing information|
OSPF LSA Type 8 - External attributes LSA
LSA Type 8 carries information about external routes, including their destination network addresses, path costs, and external route tags. When an OSPF router receives routing information from an external routing protocol, such as BGP (Border Gateway Protocol), it generates an LSA Type 5 called External LSA.
The remaining 3 LSA types are opaque. We have also mentioned some information about them.
OSPF LSA Type 9 - OSPF Link Scope Opaque (OSPFv2)
OSPF LSA Type 9, also known as OSPF Link Scope Opaque, is used in OSPFv2 to carry non-standardized or proprietary information within the OSPF domain. LSA Type 9 enables OSPF routers to exchange opaque data, allowing for custom extensions and additional functionality beyond the standard OSPF protocol.
OSPF LSA Type 10 - OSPF Area Scope Opaque LSA
OSPF LSA Type 10, known as OSPF Area Scope Opaque LSA, is used to carry opaque data specific to a particular OSPF area, enabling the transmission of custom information within that specific area.
OSPF LSA Type 11 - OSPF AS (Autonomous System) Scope Opaque LSA
OSPF LSA Type 11, referred to as OSPF AS (Autonomous System) Scope Opaque LSA, is utilized to transmit opaque data throughout the entire OSPF Autonomous System, allowing the exchange of custom information across the entire OSPF domain.
These are the various OSPF LSA types. Now let's get a hold of another important topic OSPF LSA Header.
OSPF LSA Header
LINK STATE ADVERTISEMENT (LSA) PACKET STRUCTURE (WITHIN A LINK STATE UPDATE - LSU)
All the data required to exchange network information inside an OSPF network is contained in the header of each LSA packet. This graphic will allow us to understand what data is contained in an LSA packet.
The 20-byte LSA header section contains the following fields:
- LS Age: The number of seconds that have passed since the LSA was created (in seconds), indicating when the first LSA id was created and when it will be promoted.
- Options: Indicates the OSPF features like tables.
- LS Type: Defines the LSA types, like where which LSA is being used.
- Link State ID: Identifies the network link between OSPF routers; mostly, we got to know about the IP Identification used by the OSPF process.
- Advertising Router: It displays the origin router's ID through which we can identify which process of OSPF is running on which router.
- LS Sequence Number: A unique numeral to filter out outdated and redundant LS on each LSA packet.
- LS Checksum: A specific digit supplied to LS for comparison and error detection.
- Length: Represents LSA packet length, which means the actual size of that LSA is whichever the LSA is being generated.
Frequently Asked Questions
Q1 - What is a LSA in OSPF?
LSAs, or Link State Advertisements, are multicast messages exchanged among routers within the OSPF domain. Internal routers utilize them to notify the DR/BDR routers about any modifications or updates.
Q2 - What are the LSA types in OSPF?
There are 11 LSA types which are - Router LSA, Network LSA, Summary LSA, Summary ASBR LSA, Autonomous system external LSA, Multicast OSPF LSA, Not-so-stubby area LSA, External attribute LSA, and 3 Opaque LSA Types.
Q3 - What is Type 3 LSA in OSPF?
Type 3 LSA in OSPF (Open Shortest Path First) is known as the Network Summary LSA. It is responsible for advertising summarized network information to routers within the same OSPF area, enabling efficient routing and reducing the size of the routing tables.
Q4 - What is OSPF Type 4 LSA?
OSPF LSA Type 4, OSPF ASBR Summary LSA, is used to advertise the summary information of an Autonomous System Boundary Router (ASBR) within an OSPF area. It provides a summarized view of the ASBR's external routes, enabling efficient routing decisions within the OSPF domain.
In this blog, we have discussed everything related to OSPF LSA types. OSPF is a part of our CCNA and CCNP ENCOR training. For a more detailed explanation, you can check out the CCNA training. In conclusion, OSPF (Open Shortest Path First) utilizes various Link State Advertisements (LSAs) to exchange critical routing information within the OSPF domain.
Each LSA type serves a specific purpose, such as advertising network topology, summarizing routes, or carrying custom opaque data. Understanding the different OSPF LSA types is essential for network administrators to effectively design, optimize, and maintain OSPF-based networks, enabling efficient routing and seamless connectivity across the entire OSPF infrastructure.
You can also check out - Difference between OSPF and EIGRP