OSPF LSA Types: Type 1 to 11 and Flooding Scopes - 夜莺博客

OSPF LSA Types: Type 1 to 11 and Flooding Scopes

OSPF routers build the link-state database (LSDB) from eleven different LSA types, and every type has a strict flooding scope — some never leave their area while others cross the whole autonomous system. Misreading an LSA type is how engineers convince themselves a redistribution or stub-area design is broken when it is actually working as designed. This guide explains each LSA type from Type 1 to 11 and shows how to inspect them on Cisco IOS.

LSA Types at a Glance

Type 1  Router LSA        every router          within the area
Type 2  Network LSA       DR                    within the area
Type 3  Summary LSA       ABR                   into other areas
Type 4  Summary ASBR LSA  ABR                   into other areas
Type 5  External LSA      ASBR                  entire OSPF domain
Type 6  Multicast LSA     (not used)
Type 7  NSSA External     ASBR inside NSSA      within the NSSA
Type 8  External attr LSA (not implemented by most vendors)
Type 9  Opaque link-local router                link-local scope
Type 10 Opaque area-local router                within the area
Type 11 Opaque AS-wide    router                entire OSPF domain

Types 1 and 2: Inside the Area

Type 1 (Router LSA) is generated by every router and lists its directly connected links: point-to-point links (link type 1, link ID = neighbor RID), transit networks (type 2, link ID = DR address), stub networks such as loopbacks (type 3), and virtual links (type 4). Type 1 LSAs never leave the area. Type 2 (Network LSA) is generated by the DR on broadcast and NBMA segments only — it lists every router attached to the multi-access network and turns the segment into a pseudo-node for SPF.

Types 3 and 4: Between Areas

Type 3 (Summary LSA) is created by ABRs to advertise prefixes from one area into another — every ABR regenerates it, and these are the O IA routes in your routing table. The name is misleading: OSPF does not summarize anything by default. Type 4 (Summary ASBR LSA) is also ABR-generated and advertises the location of an ASBR (its router ID) into other areas, so routers outside the ASBR's area can reach it. Routers in the same area learn the ASBR from its Type 1 LSA directly and never see a Type 4.

Types 5 and 7: External Routes

Type 5 (External LSA) is originated by the ASBR for routes redistributed from other protocols (BGP, EIGRP, static) and floods across the entire OSPF domain — except into stub areas. Type 7 (NSSA External LSA) lets an NSSA carry its own redistributed routes internally; the ABR translates Type 7 back into Type 5 for the rest of the domain (N1→E1, N2→E2). Stub and NSSA behavior ties directly to OSPF area types.

Types 6, 8-11: Rarely Seen

Type 6 (multicast OSPF) and Type 8 (external attributes for BGP) are not implemented by most vendors including Cisco — modern designs carry BGP attributes over MP-BGP. Types 9/10/11 are opaque LSAs used by traffic engineering and fast-reroute extensions; Type 9 is link-local, Type 10 area-scoped (used by TE), Type 11 AS-scoped.

Verifying LSAs on Cisco IOS

show ip ospf database
show ip ospf database router
show ip ospf database network
show ip ospf database summary
show ip ospf database external
show ip ospf database nssa-external

Each command filters the LSDB by type, showing the advertising router, age, sequence number and link count. For multi-area OSPF practice see IOS XR OSPF configuration; if an area's LSDB looks wrong, our stub/NSSA explainer usually has the answer.

原文链接:https://networklessons.com/ospf/ospf-lsa-types-explained