USD ($)
$
United States Dollar
India Rupee

Understanding OSPF LSA Type 4

Created by Deepak Sharma in Articles 6 Jan 2024
Share

Everyone who are at this position of preparing for CCIE lab must know about all ospf LSA Types. However, LSA Type-4 always remains mysterious and confusing for many of us. Let's first have a look on the LSA types available in OSPF before directly jumping on LSA type-4. 

OSPF is a link-state routing protocol that uses LSAs (Link State Advertisements) to describe the state of the network. There are several types of LSAs used in OSPF, each serving a different purpose.

Type 1 - Router LSA:

A router LSA is generated by each router in an OSPF area and describes the state of the router's links. It includes.

Router ID

Link of the router

Cost of each Link

Type 2 - Network LSA:

A network LSA is generated by the designated router (DR) on a multi-access network and describes the state of the network. It includes 

List of routers connected to the network.

Cost of each link

Type 3 - Summary LSA:

A summary LSA is generated by an Area Border Router (ABR) and describes the state of routes outside the area. It includes 

IP address of the destination network

Subnet mask

Cost of the path to reach the destination.

Type 4 - ASBR Summary LSA:

An ASBR summary LSA is generated by an ABR and describes the location of an ASBR (Autonomous System Boundary Router) that connects to an external network. It includes. 

IP address of the ASBR

Cost of the path

Type 5 - External LSA:

An external LSA is generated by an ASBR and describes the state of external networks outside the OSPF domain. It includes 

IP address of the external network

Subnet mask

Cost of the path

Type 6 - Multicast LSA:

A multicast LSA is used to distribute information about multicast groups within an OSPF domain. It includes the multicast group address and a list of routers that have joined the group.

Type 7 - NSSA External LSA:

An NSSA external LSA is generated by an ASBR in an NSSA (Not-So-Stubby Area) and describes the state of external networks that are injected into the area. It includes. 

IP address of the external network

Subnet mask

Cost of the path

Each type of LSA serves a specific purpose in OSPF and helps to ensure efficient and accurate routing within the network. Understanding the different types of LSAs and their functions is crucial for network administrators who are managing OSPF networks.

You will get many books and notes on all other types of OSPF, and they are relatively easier to understand, In this blog article I will be discussing only about type-4 LSA. Consider a small OSPF domain for better understanding of this LSA. Diagram is also given below for your reference. 

—–RIP Domain —–R1—-AREA0——R2——AREA1——–R3

Here R1 is an ASBR since it is redistributing RIP into OSPF, R2 is an ABR because both area 0 is attached to it. R3 is an internal router in area 1. In order to understand LSA Type-5 we have to understand how a router perform lookup in order to reach to an external prefix.

When R1 performs redistribution from rip into OSPF, R1generates an LSA Type-5 which contains external prefixes with its attributes. In this LSA, R1 attaches in this LSA, its router-I’d in the advertising router field and forwarding address (this may be 0.0.0.0 or any IP address depends on some parameters of the external link).

Now when a router in the same area in which ASBR is present like R2 performs few steps of recursive look up.

First look is for external prefix i.e.

Show ip ospf database external <> output of this command will contain the advertising router ip address and forward address along with other details.

If forwarder address field is a non-zero value, then further look up will perform on this address otherwise look up will perform on the advertising router field IP address which is R1’s router I’d.

R2 will then search for this address in its ospf database

show ip ospf database router

Since this router is in the same area so it will perform SPF calculation in order to reach R1 and ultimately to external prefix.

When an ABR i.e R2 pass on the LSA Type-5 to area 1 (LSA Tpye-5 are supposed to get flooded through out the ospf domain) it also generates an LSA Type-4 for area 1 in order to inform all the routers in area 1 that the external prefixes are advertised by the router address (ASBR) contained in the LSA Type-4. Since R2 the ABR forwarding this information to the internal routers in area 1 so they can contact R2 in order to reach to ASBR and ultimately the external prefixes.

Any internal router performs the first look up on external prefix

show ip ospf database external <> (assuming forwarder address field is 0.0.0.0) then look up will perform on advertising router ( R1’s router-id ) appeared in this output.

Show ip ospf database router

This will not give any output because this router does not belong to this area 1. Therefore internal router will now have to perform look up on asbr

Show ip ospf database asbr-summary <>

This contains the advertising router as R2’s router-id the ABR so further look ups will perform on this ABR in order to reach it.

Show ip ospf database router

now internal router will do SPF calculation to reach to ABR in order to reach ABBR and ultimately to external prefixes.

Comments (1)

Jyotsena Iyer Student
13 Oct 2023 | 12:08 am

I think its to the point explanation, you are right LSA Type 4 is little difficult to understand.

Share

Share this post with others