Network Kings

Multi-Access Year Deal

Get 55+ courses now at the best price ever! Use Code:    MULTIYEAR

d :
h :
m

What are the OSPF LSA Types? – Explained

ospf lsa types
ospf lsa types

OSPF, as we already know, is a Link- State routing protocol, and being a Link state routing protocol, each router in a network exchange information about the state of their directly connected links with all the routers in a network.  

It looks fine when we talk about a limited or small number of routers in a network but what happens when we have a significant number of routers? 

A lot of information will be flooded within a network leading to unnecessary network congestion, poor performance, and wastage of bandwidth. For that purpose, we use the OSPF area concept. 

But, by dividing a network into areas we are restricting router information flooding, and hence network would not have access to the necessary information required to find the best path. 

For that purpose, OSPF has a “Brahmastra “which is known as Link State Advertisements. 

In this article, we will discuss Link State Advertisements and various OSPF LSA types. 

ALSO READ: OSPF Interview Questions if you’re preparing to crack a Network Engineer job position.  

What is OSPF LSA?

In the Open Shortest Path First (OSPF) routing protocol, LSA also known as Link-State Advertisements helps to spread the routing information within an OSPF network. Routers configured with OSPF exchange LSAs to build a map of the network topology and find the best path possible to reach from one network prefix to another. All the information collected using LSA is stored in a database known as Link-State Database (LSDB) which is used to calculate the shortest path to different destinations. 

Understanding OSPF LSA Types: A Comprehensive Overview

Link State Advertisements are of different types with different functionality which are listed below:- 

 
 
 
 
 
 

Router LSA 

 
 
 
 
 

LSA Type 1 

 
 
 
 
 

Network LSA 

 
 
 
 

LSA Type 2 

 
 
 
 
 

Summary LSA 

 
 
 
 

LSA Type 3 

 
 
 
 
 

Summary ASBR LSA  

 
 
 
 

LSA Type 4 

 
 
 
 
 

Autonomous System external LSA 

 
 
 
 

LSA Type 5 

 
 
 
 
 

Multicast OSPF LSA 

 
 
 
 

LSA Type 6 

 
 
 
 
 

NSSA External LSA 

 
 
 
 

LSA Type 7 

What is LSA Type 1?

All routers generate their own Router LSA. It describes the state of its own links/interface. Type 1 LSA is flooded within an area and does not cross it. Router LSA includes information like Router ID, the status of links, and interface IP details. 

router lsa

What is LSA Type 2?

It represents the multi-access network segment. Network LSA is flooded by Designated routers only. It contains information about all the routers that are directly connected to multi-access network segments, information about DR and BDR routers, and subnet information. Similar to Router LSA, Network LSA is flooded within the same OSPF area and ensures that all the routers within an area have an accurate understanding of the network topology. 

network lsa

What is LSA Type 3?

Since Router LSA and Network LSA remain within the area, we need something to share information about a particular area with another area. For that purpose, Summary LSA or Inter-Area LSA is used. Type 3 LSA advertises routes between OSPF areas. These LSAs are generated by Area Border Router i.e. ABR. In the OSPF routing table, they are denoted as O IA. 

summery lsa

What is LSA Type 4?

These LSAs are generated by ABR to inform routers in an area about the existence of an Autonomous System Boundary Router (ASBR) in another area. This LSA informs about the path to reach external routes. 

summery asbr LSA

What is LSA Type 5?

These LSAs are generated by an ASBR to advertise external routes into OSPF. They are flooded throughout the OSPF domain.

external LSA

What is LSA Type 6?

Group Membership LSA or Type 6 LSAs are used in OSPFv3 for multicast group memberships within the link. 

What is LSA Type 7?

It is also called NSSA External LSA. In Not-So-Stubby-Area (NSSA) configurations, these LSAs are used to carry external route information. Since in Stub areas, LSA 5 is not allowed hence we use LSA 7 in this case. ABR routers convert LSA 7 into LSA 5 when it is flooded outside the stub area and convert LSA 5 to LSA 7 when LSA 5 enters the stub area. 

NSSA External LSA
OSPF LSA

We can see that LSA is the backbone of OSPF. It helps to understand network topology within OSPF routers. It also helps to calculate the shortest path to reach the destination. Not only it helps to find the shortest path but also finds the redundant path quickly whenever the primary path goes down for any reason. Hence it ensures fast route convergence which helps the network to quickly adapt to changes.

To make sure that you thoroughly understand OSPF, do watch out this video by Atul sir wherein he dives deep into the topic with simple explanations for a better understanding of the topic.

Let us quickly see the difference between each LSA. 

LSA TYPE 

Description 

Originator 

Flooded To 

Purpose 

Type 1 

Router LSA 

Router 

Same Area 

Describes router’s Link 

Type 2 

Network LSA 

DR 

Same Network 

Describes routers on a network segment 

Type 3 

Summary LSA 

ABR 

Other Area 

Advertise routes between areas 

Type 4 

Summary ASBR LSA 

ABR 

 

Informs about an ASBR 

Type 5 

Autonomous System external LSA 

ASBR 

OSPF Domain 

Advertises external routes 

Type 6 

Multicast OSPF LSA 

OSPFv3 router 

Same Area 

Used for multicast group memberships 

Type 7 

NSSA External LSA 

ASBR in NSSA 

NSSA 

Carries external routes in NSSA configuration 

What is Open Shortest Path First (OSPF) in Networking?

ospf protocol
ospf protocol

There are many routing protocols in the networking domain that define a set of rules on how data should be transmitted. Open Shortest Path First (OSPF) is one such dynamic routing protocol. It is called a dynamic protocol as it is able to dynamically exchange routing information between the routers that are the nearest neighbors.

In this blog, we will learn what the OSPF protocol is and how it works. We will also learn about the different states of the OSPF protocol. In the end, we will also discuss the advantages and disadvantages of the protocol.

In the previous blog , we learned about the types of FHRPs in detail. I definitely recommend you go through that blog before jumping to this blog.

Let us now start learning about the OSPF protocol!

What is the OSPF Protocol?

Open Shortest Path First (OSPF) is an Interior Gateway Protocol (IGP) that has an algorithm type of Link-State.

dynamic routing protocol

This is how a link-state protocol functions:

  • When we use a link-state routing protocol, every router creates a ‘connectivity map’ of the network.
  • To make this happen, each router advertises information about its interfaces (connected networks) to its neighbors. These advertisements are passed along to other routers until all the other routers in the network develop the same map of the network.
  • Therefore, it is very important to note that each of the routers then uses this same map to calculate the best routers for each destination.
  • Since more information is shared, link-state protocols use more resources on the router.
  • The link-state routers react faster to the changes in the network than the distance vector routers.

Now, let us understand the OSPF in detail:

  • If we expand the term OSPF, it is Open Shortest Path First.
  • It uses the Shortest Path First algorithm which is also called Dijkstra’s algorithm. This algorithm is named after the name of a Dutch computer scientist.
  • There are three versions of OSPF:
    • OSPFv1: This is the first version of OSPF created in the year 1989. It is no longer in use.
    • OSPFv2: This is the second version of OSPF created in 1998. It is used in IPv4. This version is important for CCNA 200-301.
    • OSPFv3: This is the latest version of OSPF created in the year 2008. This version is used for IPv6 and as well as for IPv4.
  • The routers store information about networks in Link State Advertisements (LSAs) which are organized in a structure called the Link State Database (LSDB).
  • Routers flood the LSAs until all the routers in the OSPF area develop the same map of the network (LSDB).
  • This flooding is similar to switches when they receive a broadcast frame or an unknown unicast frame.
  • In OSPF, flooding means that they send the LSAs to all of their OSPF neighbors.

How OSPF Works?

The basic functioning of OSPF is carried out through LSA Flooding. As we know by now, the OSPF chooses the shortest path for the routers. The main process involves the sharing of LSAs and determining the best route to each destination. 

This is how OSPF works in three main steps:

  • The first step is to become neighbors with other routers connected to the same segment.
  • Then the routers exchange the Link State Advertisements (LSAs) with neighbor routers.
  • After that, each router independently calculates the best routes to each destination. Then it inserts all of these into the routing table.

What are the Different States of OSPF?

The network devices that use the OSPF protocol undergo certain states. The various states of OSPF are as follows:

  • Down:

No “Hello” packets are received on the interface in the down state. The downstate means that the OSPF adjacency process has not begun yet.

  • INIT:

The “Hello” packets are received from other routers in the INIT state.

  • 2WAY:

In this state, a bidirectional connection is formed. Both routers receive “Hello” packets from other routers.

  • Exstart:

In this state, the exchange of NULL DBD takes place. Similar to the First Hop Redundant Protocol (FHRP), the election of the master and slave router occurs. The router with the higher router ID becomes the master while the router with the lower router ID becomes the slave. This decides which router sends the DBD first.

  • Exchange:

The actual DBDs are exchanged in this state.

  • Loading:

The Link State Advertisements (LSAs) along with LSUs and LSRs are exchanged in this state.

  • Full:

All the information is synced in this state. It is only after the Full state that the OSPF routing begins!

Therefore, there are a total of seven states of OSPF that the routers undergo before the actual OSPF routing begins.

What are the Advantages of OSPF?

The following are the major advantages of the OSPF protocol:

  • OSPF can be configured on both IPv4 and IPv6 versions of IPs.
  • It can carry out load balancing.
  • It uses the SPF algorithm to present a loop-free technology.
  • It is not Cisco proprietary. It can run on many routers.
  • It is a classless protocol. 
  • It has unlimited hop counts.
  • It works very fast.

What are the Disadvantages of OSPF?

The following are the disadvantages of the OSPF protocol:

  • It needs extra storage. Therefore, it means that it needs an extra CPU process to run the SPF algorithm.
  • It needs more RAM to save adjacency topology.
  • It is very complex. Therefore, it’s very difficult to troubleshoot.

Bottom Line:

This marks the end of the OSPF blog. So far, we have learned what the OSPF protocol is and why it is called a Link-State Protocol. We have also understood the working of the protocol.

Then, we learned the different states the routers undergo before the actual OSPF process begins. At last, we looked over the advantages and disadvantages of the OSPF protocol.

Stay tuned for learning more protocols such as BGP, EIGRP, and RIP in the CCNA series

Happy studying.