OSPF LSA Flooding Scope

Before start talking about the LSAs contained within areas, I would remind about what a link-state is.

The link-state describes information about the link such:

  1. Description of the link.
    1. Type – Can be Transit, P2P or Stub.
    2. Cost – This is the metric.
  2. Adjacencies with other OSPF-enabled routers in the Link.

This information is contained in the OSPF databases for each area.

Now, when we talk about the different LSA types, we have to understand what part of this link-state information is contained inside each area.  A keyword I will be using in this post is Flooding Scope.

The flooding scope is basically how far in the network the LSA will be propagated unchanged.

 

LSA Types and Flooding Scope

 

LSA Type-1

Router LSAs are originated by all OSPF routers.

Type-1 LSA contains the Link State ID (which is represented by the RID) and all the different Router Link-States.   The LSA may contain information about multiple links within the same area.  The flooding scope of Type-1 LSA is a single area.  This means that the Router will generate a single Type-1 LSA per area.   The link type for this type of LSA is transit.

OSPF-LSA-TYPE-1

Please note R1 has links in area 0 and area 13, also, R2 has links in area 0 and area 24.  These routers are known as Area Border Routers (ABRs).  The “boundary” or flooding scope is represented by the red dashed line.   R1 has two separated databases, one for the LSAs in area 0 and other for the LSAs in area 13.   The same case is for R2, where 2 different databases were created; one for LSAs in area 0 and other for the LSAs in area 24.    In both cases, the links belonging to each area is not advertised to other areas.

LSA Type-2

Network LSAs are originated by the Designated Router (DR).

Type-2 LSAs contains the Link ID (which is the IP address of the DR), the Netmask, and RIDs of connected neighbors within the area.  The flooding scope of Type-2 LSA is a single area.

OSPF-LSA-TYPE-2

In this example, Type-2 LSAs were generated by the elected DRs in each area.  This is because the media is Ethernet and the network type is broadcast by default; then the DR/BDR election took place.  However, this won’t be the case if let’s say the link between R1 and R3 is configured as Network Type Point-to-Point.  Then LSA Type-2 won’t be present for the Area 13.

LSA Type-3

Network Summary LSAs are originated by the Area Border Routers (ABRs).

The ABRs generate summary information of networks advertised in other areas with their respective cost to reach them.  Type-3 LSA contains the Link State ID (which in this case is the summary network address), the Advertising Router ID (ABR RID), the Network mask and the calculated Metric to reach the network.

Type-3 LSAs operates in a very similar way to distance-vector protocols where a Router has a prefix with its respective cost, then that information is advertised to the neighbors by the ABR.   The prefix is learned by the neighbor via the ABR (Routing by rumor).  The flooding scope of Type-3 LSA is a single area.

OSPF-LSA-TYPE-3

In this example, R3 is advertising the Network A (NA).   For the prefix of NA,  R1 (ABR) will generate LSA Type-3 with the summary address of NA and its network mask, the LSA will also include the Advertising RID which is the RID of R1 and the cost to reach the network (NA+R3+R1), then will be advertised to R2.  R2 (ABR) will also generate its own Type-3 LSA and will advertise the prefix of NA to R4 with its own RID as the Advertising RID and the aggregate cost of R2.

LSA Type-4

ASBR Summary LSAs are originated by the Area Border Routers (ABRs).

Type-4 LSAs provides reachability information for ASBRs.   Type-4 LSA contains the Link State ID (which is represented by the RID of the ASBR) and the Advertising Router ID (ABR RID).   The flooding scope of Type-4 LSA is a single area.

Type-4 LSAs are originated when a Router acting as ASBR sends an updated Type-1 LSA with the “E” bit set  (E=Edge).  The presence of this bit informs the ABR that the advertising router is an ASBR and generates the Type-4 LSA.    Another way the Type-4 LSA is originated is by regeneration.   Regeneration occurs when another ABR receive a Type-4 LSA.

LSA Type-5

External LSAs are originated by Autonomous System Boundary Routers (ASBRs).

Type-5 LSAs contains Link State ID (External Routes), the Network Mask, the Advertising Router ID (ASBR RID), The External Metric Type (E1 or E2) and the Forward Address.     The flooding scope of Type-5 LSA is the entire OSPF domain (Standard areas excluding stub and NSSA areas).

The External Metric Type 1 (E1) set the cost as the total internal cost to get to the external destination network, including the cost to the ASBR.

The External Metric Type 2 (E2) is the default and set the cost to the advertised cost from the ASBR to the external destination network.

When the forwarding Address is set to null (0.0.0.0), mean that the route is reachable only via the advertising router.

OSPF-LSA-TYPE-4-and-5

In this example, R4 is redistributing routes from another routing protocol into OSPF.  R4 is the ASBR in the network.   R4 generates Type-5 LSA and advertise it to the entire OSPF Domain. R2 (ABR) generates Type-4 LSA.   The Type-5 LSA contains information of the redistributed external routes, the advertising Router and the metric. The Type-4 LSA contains the ASBR reachability information.   Without Type-4 LSA, Router 3 in Area 13 won’t be able to reach the redistributed networks.

LSA Type-7

NSSA External LSA is originated by Autonomous System Boundary Routers (ASBR) in NSSA areas.

Type-7 LSAs are used in NSSA areas in place of a type 5 LSA.  Type-7 LSAs contains Link State ID (External Routes), the Network Mask, the Advertising Router ID (NSSA ASBR RID), The External Metric Type (N1 or N2) and the Forward Address.  The flooding scope of Type-7 LSA is a single area.

The Routers in a Not-So-Stubby Areas (NSSAs) do not receive external LSAs from ABRs but are allowed to redistribute external routing information.  Type-7 LSAs are translated into Type-5 LSAs by the ABR and flooded to the rest of the OSPF domain.

The External Metric Type 1 (N1) set the cost as the total internal cost to get to the external destination network, including the cost to the ASBR.

The External Metric Type 2 (N2) is the default and set the cost to the advertised cost from the ASBR to the external destination network.

OSPF-LSA-TYPE-7

In this example, R4 resides in an NSSA Area.  R4 is redistributing routes from another routing protocol into OSPF.  R4 is the NSSA ASBR in the network.   R4 generates Type-7 LSA and advertise it to R2 (ABR).  R2 translates from Type-7 LSA into Type-5 LSA and flood the information within the OSPF domain.  R3 (ABR) generates Type-4 LSA containing the NSSA ASBR reachability information when R2 advertise an updated Type-1 LSA with the “E” bit set.

It is time to close this post. Thank you for visiting.