Skip to content
5 min read OSPF

OSPF LSA Types Explained (Type 1–7)

OSPF uses seven LSA types (1 through 7) to describe routers, networks, summaries, and externals. Here is what each one carries, who generates it, and where it floods.

OSPF LSA Types Explained (Type 1–7)

Type 1: Router LSA

What it describes: A router's directly connected links
Generated by: Every OSPF router
Flooded: Within the local area only
Key fields: Router ID, link types, costs

Example:

R1# show ip ospf database router 1.1.1.1

  LS Type: Router Links
  Link State ID: 1.1.1.1
  Advertising Router: 1.1.1.1
  Number of Links: 3

    Link connected to: a Stub Network
     (Link ID) Network/subnet number: 1.1.1.1
     (Link Data) Network Mask: 255.255.255.255
      Number of TOS metrics: 0
       TOS 0 Metrics: 1

    Link connected to: another Router (point-to-point)
     (Link ID) Neighboring Router ID: 2.2.2.2
     (Link Data) Router Interface address: 10.0.12.1
      Number of TOS metrics: 0
       TOS 0 Metrics: 1

What this tells us:

Type 2: Network LSA

What it describes: Multi-access network (Ethernet) and which routers are attached
Generated by: Designated Router (DR) only
Flooded: Within the local area only
Key fields: DR's IP, list of attached routers

Example:

R1# show ip ospf database network 192.168.1.1

  LS Type: Network Links
  Link State ID: 192.168.1.1 (address of Designated Router)
  Advertising Router: 2.2.2.2
  Network Mask: /24
        Attached Router: 1.1.1.1
        Attached Router: 2.2.2.2
        Attached Router: 3.3.3.3

What this tells us:

Note: Point-to-point links don't generate Type 2 LSAs (no DR).

Type 3: Summary LSA

What it describes: Routes to networks in other areas
Generated by: Area Border Routers (ABRs)
Flooded: Into adjacent areas
Key fields: Network address, mask, cost

Purpose: Summarize inter-area routes

Example:

R4# show ip ospf database summary 192.168.200.0

  LS Type: Summary Links (Network)
  Link State ID: 192.168.200.0 (summary Network Number)
  Advertising Router: 1.1.1.1 (ABR)
  Network Mask: /24
        TOS: 0  Metric: 3

What this tells us:

Routing table entry:

O IA 192.168.200.0/24 [110/3] via 172.16.14.1

O IA = Inter-Area (came from Type 3 LSA)

Type 4: ASBR Summary LSA

What it describes: How to reach an ASBR (router redistributing external routes)
Generated by: ABRs
Flooded: Into adjacent areas
Key fields: ASBR's Router ID, cost to reach it

Purpose: Tell routers in other areas where the ASBR is

Example:

R4# show ip ospf database asbr-summary 3.3.3.3

  LS Type: Summary Links (AS Boundary Router)
  Link State ID: 3.3.3.3 (AS Boundary Router address)
  Advertising Router: 1.1.1.1 (ABR)
  Network Mask: /0
        TOS: 0  Metric: 2

What this tells us:

Why it matters: Routers need to know how to reach the ASBR to get external routes.

Type 5: External LSA

What it describes: Routes from outside OSPF (redistributed routes)
Generated by: ASBRs
Flooded: Throughout the entire OSPF domain (except stub areas)
Key fields: External network, metric type (E1/E2)

Example:

R1# show ip ospf database external 0.0.0.0

  LS Type: AS External Link
  Link State ID: 0.0.0.0 (External Network Number)
  Advertising Router: 3.3.3.3 (ASBR)
  Network Mask: /0
        Metric Type: 2 (Larger than any link state path)
        TOS: 0
        Metric: 1
        Forward Address: 0.0.0.0
        External Route Tag: 0

What this tells us:

Routing table entry:

O*E2 0.0.0.0/0 [110/1] via 10.0.23.3

O*E2 = External Type 2

Type 7: NSSA External LSA

What it describes: External routes in an NSSA (Not-So-Stubby Area)
Generated by: ASBRs in NSSAs
Flooded: Within the NSSA only
Converted to: Type 5 LSA at the ABR (when leaving NSSA)

Purpose: Allow limited external route injection into stub-like areas

Example:

R4# show ip ospf database nssa-external 172.16.50.0

  LS Type: Type-7 AS External Link
  Link State ID: 172.16.50.0 (External Network Number)
  Advertising Router: 4.4.4.4
  Network Mask: /24
        Metric Type: 2
        TOS: 0
        Metric: 20
        Forward Address: 0.0.0.0
        External Route Tag: 0

What happens:

  1. ASBR in NSSA generates Type 7
  2. Type 7 floods within NSSA
  3. ABR converts Type 7 to Type 5
  4. Type 5 floods to rest of OSPF domain

LSA Type Summary Table

Type Name Generated By Flooded Describes
1 Router LSA All routers Within area Router's links
2 Network LSA DR Within area Multi-access network
3 Summary LSA ABR Between areas Inter-area routes
4 ASBR Summary ABR Between areas How to reach ASBR
5 External LSA ASBR Entire domain* External routes
7 NSSA External ASBR (in NSSA) Within NSSA NSSA external routes

*Except stub areas

Get the OSPF Field Reference - 9 pages, free

Everything you'd want to remember about OSPF on nine printable pages. State machine diagram, LSA types, troubleshooting decision tree, copy-paste IOS XE templates, and real lab captures. Free for PingLabz members - just sign up with your email.

Get the OSPF cheat-sheet

LSA Flow Example

Multi-Area Network with External Routes

Area 10 (NSSA)    Area 0        Area 20
    [R4]------[R1]----[R2]----[R3]------Internet
   ASBR        ABR           ABR        (ASBR)

LSA flow:

Within Area 10:

R1 (ABR) generates:

Within Area 0:

R3 (ASBR) generates:

R2 (ABR) generates:

Viewing LSAs

Show All LSAs

R1# show ip ospf database

Show Specific LSA Types

R1# show ip ospf database router
R1# show ip ospf database network
R1# show ip ospf database summary
R1# show ip ospf database asbr-summary
R1# show ip ospf database external
R1# show ip ospf database nssa-external

Show LSA for Specific Network

R1# show ip ospf database summary 192.168.1.0

LSAs and Area Types

Standard Area

Stub Area

Totally Stubby Area

NSSA

Totally NSSA

Summary

Now you know:

Type 1 (Router LSA) — Every router's links
Type 2 (Network LSA) — DR advertises multi-access segment
Type 3 (Summary LSA) — ABR advertises inter-area routes
Type 4 (ASBR Summary) — ABR advertises path to ASBR
Type 5 (External LSA) — ASBR advertises external routes
Type 7 (NSSA External) — External routes within NSSA
LSA flooding scope — Area vs domain-wide

Next Step:
LSAs populate the LSDB. How does SPF use the LSDB? Read How OSPF SPF Algorithm Works next.

Screenshot Suggestions:

  1. show ip ospf database overview showing all LSA types
  2. show ip ospf database router detailed output
  3. LSA flow diagram in multi-area network
  4. Table comparing LSA types and flooding scope

Internal Links: