Octet

Why does OSPF need a Type 4 LSA at all?

Show the answer

Say this first

A Type 5 LSA says "prefix X, reach it via ASBR 3.3.3.3", but routers in other areas do not have 3.3.3.3's Type 1 LSA, so they cannot compute their cost to it. The ABR fills the gap with a Type 4 that advertises the ASBR's router ID and the ABR's cost to it. Routers then add their cost to the ABR.

Go deeper

Example

R3 (3.3.3.3) is an ASBR in area 0 originating a default route. R2 (2.2.2.2) is the ABR to area 1. R1 (1.1.1.1) is inside area 1.

Output
R1# show ip ospf database

            OSPF Router with ID (1.1.1.1) (Process ID 1)

                Router Link States (Area 1)

Link ID         ADV Router      Age         Seq#       Checksum Link count
1.1.1.1         1.1.1.1         312         0x80000004 0x00B1C2 2
2.2.2.2         2.2.2.2         298         0x80000003 0x0047E1 1

                Summary Net Link States (Area 1)

Link ID         ADV Router      Age         Seq#       Checksum
10.0.23.0       2.2.2.2         301         0x80000001 0x00D4A8

                Summary ASB Link States (Area 1)

Link ID         ADV Router      Age         Seq#       Checksum
3.3.3.3         2.2.2.2         301         0x80000001 0x00C6B3

                Type-5 AS External Link States

Link ID         ADV Router      Age         Seq#       Checksum Tag
0.0.0.0         3.3.3.3         640         0x80000002 0x00E5F1 1

The Type 5 names 3.3.3.3. The only thing in area 1 that mentions 3.3.3.3 is the Type 4 from R2. Without it, R1 would ignore the external route.

Where Type 4 is not needed

  • Inside the ASBR's own area, where its Type 1 LSA is present.
  • In stub and NSSA areas, which do not get Type 5 LSAs at all.
  • For an NSSA, the translating ABR becomes the advertising router of the Type 5. Other areas then get a Type 4 for that ABR as the ASBR.

Traps

  • Saying Type 4 carries external prefixes. It only carries the ASBR's router ID and a cost.
How did you do?