Ospf Lsa Summary
Ospf Lsa Summary
Link-State Announcements
When OSPF neighbors become adjacent, the LSDBs synchronize between the OSPF
routers. As an OSPF router adds or removes a directly connected network link to or from its
database, the router floods the LSA out all active OSPF interfaces.
The OSPF LSA contains a complete list of networks advertised from that router.
LSA Types 1, 2, and 3 are used for building the SPF tree for intra-area and interarea route
routes.
LSA Types 4, 5, and 7 are related to external OSPF routes (that is, routes that were
redistributed into the OSPF routing domain).
LSA Header
LSA Sequences
• OSPF uses the sequence number to overcome problems caused by delays in LSA propagation in
a network.
• The LSA sequence number is a 32-bit number for controlling versioning.
• When the originating router sends out LSAs, the LSA sequence number is incremented.
• If a router receives an LSA sequence that is greater than the one in the LSDB, it processes the
LSA.
• If the LSA sequence number is lower than the one in the LSDB, the router deems the LSA old
and discards the LSA.
LSA Age and Flooding
• Every OSPF LSA includes an age that is entered into the local LSDB and that will increment by 1
every second.
• When a router’s OSPF LSA age exceeds 1800 seconds (30 minutes) for its networks,
the originating router advertises a new LSA with the LSA age set to 0.
• As each router forwards the LSA, the LSA age is incremented with a calculated (minimal) delay
that reflects the link.
• If the LSA age reaches 3600 (60 minutes), the LSA is deemed invalid and is purged from
the LSDB.
• The repetitive flooding of LSAs is a secondary safety mechanism to ensure that all routers
maintain a consistent LSDB within an area.
• Generated by each router for each area to which the router belongs.
• These packets describe the states of the router’s link to the area and are flooded only within a
particular area.
o A Type 1 LSA entry exists for each OSPF-enabled link (that is, every interface and its attached
networks).
• All the router’s links in an area must be described in a single LSA.
• Type 1 LSAs are the essential building blocks within the LSDB.
• The Router LSA indicates whether it's an ABR, ASBR or an endpoint of a Virtual Link.
During the SPF tree calculation, network link types are one of the following:
Packet Format
Router LSA - Packet Capture
Different Router Link Types
The advertising router for Type 3 LSAs is the last ABR that advertises the prefix. The metric in the Type 3
LSA uses the following logic:
• If the Type 3 LSA is created from a Type 1 LSA, it is the total path metric to reach the originating
router in the Type 1 LSA.
• If the Type 3 LSA is created from a Type 3 LSA from Area 0, it is the total path metric to the
ABR plus the metric in the original Type 3 LSA.
Example 1
Example 2
Example 1:
• R4 does not know if the 10.56.1.0/24 network is directly attached to the ABR (R5) or if it is
multiple hops away.
• R4 knows that its metric to the ABR (R5) is 1 and that the Type 3 LSA already has
a metric of 1, so its total path metric is 2 to reach the 10.56.1.0/24 network.
Example 2:
• R3 does not know if the 10.56.1.0/24 network is directly attached to the ABR (R4) or if it is
multiple hops away.
• R3 knows that its metric to the ABR (R4) is 65 and that the Type 3 LSA already has
a metric of 2, so its total path metric is 67 to reach the 10.56.1.0/24 network.
Summary LSA Packet Format
• When the Type 5 LSA crosses the first ABR, the ABR creates a Type 4 LSA with a metric set to
the total path metric to the ASBR.
• When an ABR receives a Type 4 LSA from Area 0, the ABR creates a new Type 4 LSA with a
metric set to the total path metric of the first ABR plus the metric in the original Type 4 LSA.
An ABR advertises only one Type 4 LSA for every ASBR, even if the ASBR advertises thousands
of Type 5 LSAs.
To install an external LSA in the RIB, two essential things must take place:
1. The calculation router must see the ASBR through the intra-area or inter-area route, which
means that it should have either a Type 1 Router LSA or a Type 4 ASBR Summary LSA, in
case of multiple areas.
2. The forwarding address must be known through an intra- or inter-area route.
LSA Type 1
LSA Type 2
• Generated by ASBR
o Flooded to all non-stub areas
• Describes routes ASBR is redistributing
LSA Type 3
• Generated by ABR
o Flooded from Area 0 into non-backbone areas and vice-versa
• Describes ABR’s reachability to links in other areas
o Includes cost, but hides ABR’s actual path to destination
• SPF not run for ABR advertised routes
o ABR can reach link A via SPT in cost X
o I can reach ABR via SPT in cost Y
o Implies I can reach link A via SPT in cost X + Y
LSA Type 4
• Generated by ABR
• Describes ABR’s reachability to ASBRs in other areas
• SPF not run to reach inter-area ASBR
o ABR can reach ASBR via SPT in cost X
o I can reach ABR via SPT in cost Y
o Implies I can reach ASBR via SPT in cost X + Y
Thanks
Rakesh