Types of LSA in OSPF
OSPF uses a LSDB (link state database) and fills this with LSAs (link state advertisement). Instead of using 1 LSA packet OSPF has many different types of LSAs and in this tutorial I’m going to show all of them to you. Let’s start with an overview:
LSA Type 1: Router LSA
LSA Type 2: Network LSA
LSA Type 3: Summary LSA
LSA Type 4: Summary ASBR LSA
LSA Type 5: Autonomous system external LSA
LSA Type 6: Multicast OSPF LSA
LSA Type 7: Not-so-stubby area LSA
LSA Type 8: External attribute LSA for BGP
Let's look at LSA header which is common to all types of LSA's
•Common to all LSAs •Also used in Database description packets •Three fields in the header uniquely identify every LSA: the Type, Link State ID, and Advertising Router. •Three other fields uniquely identify the most recent instance of an LSA: the Age, Sequence Number, and Checksum.
Router LSA (TYPE-1)
The Router LSA is generated by each router for each area it is located. In the link-state ID you will find the originating router’s ID.
•Produced by every router •Flooded within an area •List of all of router’s links (interfaces), along with state and corresponding costs.
Network LSA (TYPE-2)
Network LSAs are generated by the DR. Link State ID for Network LSAs is the IP address of the DR's interface to the network.
Produced by the DR on multi-access networks. • Flooded within an originating area. • Represent the multi-access network. • Network address and network mask. • Addresses of attached routers.
Network Summary LSA (TYPE-3)
The summary LSA is created by the ABR and flooded into other areas.
Produced by Area Border Routers. • Sent into an area to advertise prefixes outside that area. •One per destination (prefix). •If multiple paths known, lowest-cost LSA is advertised. • When a NS LSA is received, the cost of the route to the ABR is added to the cost advertised in the NS LSA.
ASBR Summary LSA (TYPE-4)
Other routers need to know where to find the ASBR. This is why the ABR will generate a summary ASBR LSA which will include the router ID of the ASBR in the link-state ID field.
•Produced by Area Border Routers. •Format Identical to NS (type 3) LSAs except difference in field contents is the Type and the Link State ID •Advertise (host) routes to ASBRs.
AS External LSA (TYPE-5)
• Produced by ASBRs. • Advertise a destination (or a default route) external to the AS. • Flooded throughout the AS (but not stub areas). –Since they are not associated with a particular area! • Advertised prefix. • Forwarding address (of external router). • Metric.
Type 7 – External LSA
Also known as not-so-stubby-area (NSSA) LSA: If a area is a NSSA (not-so-stubby-area) which doesn’t allow external LSAs (type 5). To overcome this issue we are generating type 7 LSAs instead.