14 mins read

OSPF LSA

1. LSA Types

OSPF uses different LSA types (Link State Advertisements) to share routing information between routers and build its LSDB (Link State Database). Each LSA type has a specific purpose and flooding scope where it is flooded only within or between areas.

Find next more details about the LSA Types:

LSA Type 1 – “Router” – generated by every router

This LSA is flooded only within the area. Router LSA describes the links and neighbors of the local router.

LSA Type 2 – “Network” – generated only by the DR on the segment

Type 2 LSA is used only for broadcast media (Ethernet by default) and is originated by the Designated Router (DR) of the segment. It is used to represent the segment with all attached routers. The flooding scope is within the area only.

LSA Type 3 – “Summary” – generated by the ABR

Summary LSA is used from the ABR to exchange information from LSA type 1 and LSA type 2 to other attached areas. Its scope is whole OSPF domain if not limited by the area design.

LSA Type 4 – “ASBRSum” – generated by ABR to advertise ASBR

Autonomous System Border Routers are routers that inject external routing information to the OSPF domain. ASBR Summary LSA describe the router ID of ASBR routers. This LSA is generated by an ABR attached to the area in which the ASBR is located to describe the reachability to this ASBR router-id. Its scope is the whole OSPF domain.

LSA Type 5 – “Extern” – external prefixes generated by ASBR

This LSA describes IP routes redistributed from other routing protocol including static routes. These LSAs are generated by ASBRs. They are flooded to all areas and OSPF routers except the areas, which by design do not need them. By default, the metric type used by Junos OS is type 2, which includes only the external cost of the route and ignoring internal cost to reach the ASBR router. Type 1 consists of external cost plus the internal cost to the ASBR, which can be configured.

LSA Type 7 – “NSSA” – external prefixes inside NSSA Area

NSSA External LSA is similar to External LSA Type 5 as it is representing IP prefixes external to OSPF domain. The difference is that these LSAs are send by ASBRs inside a NSSA area. Type 7 LSAs are translated to an LSA Type 5 by the ABR attached to the NSSA area from where the LSA Type 7 is generated.

LSA Type 10 – “Opaque” – traffic engineering purposes

This LSA has an area wide scope and is used for exchanging additional information about the links used for traffic-engineering purposes in MPLS networks. The information from that LSA is used to populate the Traffic Engineering Database (TED), used for the Constrained Shortest Path First (CSPF) algorithm.

2. Wireshark

First, let’s see the encapsulation of an OSPF packet:

Next, let’s see how different LSA Types look like in Wireshark:

3. Summary

LSA Types summary:

Type Name LSA ID Data
1 Router RID V,E,B
bits
Link Type
p2p
Transig
Stub
Virtual Link
Link ID
Neighbor RID
DR int IP
Network
Neighbor RID
Link Data
Local int IP
Local int IP
Mask
Local int IP
Metric
2 Network DR IP Mask Attached Router
(repeatead for all routers)
3 Summary Network Mask Metric
4 ASBR Summary ASBR RID Mask (0.0.0.0) Metric
5 AS External Network Metric E bit
(Metric type)
Metric Forwarding
Address
Tag
7 NSSA External Network Metric E bit Metric Forwarding
Address
Tag
10 Opaque Locally
significant ID
Traffic engineering

4. OSPF3 (IPv6)

OSPF3 was developed for IPv6, but supports both IPv6 and IPv4.

The OSPF encapsulation and LSA types are similar (but not identical). Unsurprisingly, we see that OSPF3 exchanges LSA using Link Local IPv6 addressing, so family inet6 must be activated on all OSPF3 interfaces (even when using only realm ipv4).

OSPF3 will be covered in a dedicated post.


External Resources:

Leave a Reply

Your email address will not be published. Required fields are marked *