OSPFv2 LSA Type 5 (External LSA)

OSPF LSA type 5, also known as the AS External LSA, is one of the OSPF LSA types and is generated by an Autonomous System Border Router (ASBR). It advertises external prefixes redistributed into OSPF from an external source, such as another routing protocol or a static route. In the LSA type 4 lesson, we saw how the type 4 ASBR Summary LSA tells routers in other areas how to reach the ASBR. But the type 4 LSA says nothing about the actual external prefix. That’s the job of the type 5 external LSA.

Unlike type 3 and type 4 LSAs, the type 5 LSA is not regenerated by ABRs. It floods across the entire OSPF domain unchanged, so every router sees the exact same LSA that the ASBR originated. In this lesson, you will learn how type 5 LSAs are generated, how they flood through the OSPF domain, and what they look like in the Link State Database (LSDB) on Cisco IOS routers.

Key Takeaways

  • The type 5 LSA is the AS External LSA. It advertises external prefixes that have been redistributed into OSPF.
  • Type 5 LSAs are generated by the ASBR, not by ABRs.
  • The Link State ID in a type 5 LSA is the external network prefix, not a router ID.
  • Unlike type 3 and type 4 LSAs, type 5 LSAs are not regenerated at each ABR. They flood unchanged across the entire OSPF domain.
  • OSPF supports two external metric types:
    • E1 adds the internal OSPF cost to the external cost
    • E2 uses only the external cost and is the default.
  • Stub areas do not receive type 5 LSAs. External routes are blocked in stub areas by design.
  • Routers use the Advertising Router field in the type 5 LSA to look up the matching type 4 LSA and determine how to reach the ASBR.
  • The Forward Address field tells routers where to send traffic for the external prefix. When set to 0.0.0.0, traffic is sent to the ASBR itself.

Prerequisites

To understand this lesson, you should be familiar with the following topics:

  • OSPF fundamentals: How OSPF builds neighbor adjacencies, exchanges LSAs, and runs SPF.
  • OSPF multi-area: How to configure OSPF with multiple areas.
  • LSA type 1 (Router LSA): The ASBR sets the E-bit in its type 1 LSA to signal that it redistributes external routes.
  • LSA type 4 (ASBR Summary LSA): Routers in other areas use the type 4 LSA to locate the ASBR. Without it, they cannot resolve where to send traffic for the external prefix in the type 5 LSA.
  • Route redistribution: Type 5 LSAs exist because of redistribution. Understanding how routes are redistributed into OSPF makes this LSA much easier to follow.

Configuration

We’ll use the following topology:

Ospf Type 4 Summary Asbr Lsa Topology

It is the same topology we used in the LSA type 4 lesson. R1 is an ASBR and redistributes a prefix into OSPF. All routers run Cisco IOS Software [Dublin], Linux Software (X86_64BI_LINUX-ADVENTERPRISEK9-M), Version 17.12.1, RELEASE SOFTWARE (fc5).

Configurations

Want to take a look for yourself? Here you will find the configuration of each device.

R1

hostname R1
!
ip cef
!
interface Loopback0
 ip address 11.11.11.11 255.255.255.255
!
interface Ethernet0/1
 ip address 192.168.12.1 255.255.255.0
 ip ospf network point-to-point
!
router ospf 1
 router-id 1.1.1.1
 redistribute connected route-map CONNECTED_TO_OSPF
 network 192.168.12.0 0.0.0.255 area 1
!
ip access-list standard R1_L0
 10 permit 11.11.11.11
!
route-map CONNECTED_TO_OSPF permit 10 
 match ip address R1_L0
!
end

R2

hostname R2
!
ip cef
!
interface Ethernet0/1
 ip address 192.168.12.2 255.255.255.0
 ip ospf network point-to-point
!
interface Ethernet0/2
 ip address 192.168.23.2 255.255.255.0
 ip ospf network point-to-point
!
router ospf 1
 router-id 2.2.2.2
 network 192.168.12.0 0.0.0.255 area 1
 network 192.168.23.0 0.0.0.255 area 0
!
end

R3

hostname R3
!
ip cef
!
interface Ethernet0/1
 ip address 192.168.23.3 255.255.255.0
 ip ospf network point-to-point
!
interface Ethernet0/2
 ip address 192.168.34.3 255.255.255.0
 ip ospf network point-to-point
!
interface Ethernet0/3
 no ip address
!
router ospf 1
 router-id 3.3.3.3
 network 192.168.23.0 0.0.0.255 area 0
 network 192.168.34.0 0.0.0.255 area 2
!
end

R4

hostname R4
!
ip cef
!
interface Ethernet0/1
 ip address 192.168.34.4 255.255.255.0
 ip ospf network point-to-point
!
router ospf 1
 router-id 4.4.4.4
 network 192.168.34.0 0.0.0.255 area 2
!
end

Topology: OSPF Area 0-1-2 and external network

Verification

We’ll check all routers one-by-one.

R1

We’ll start with R1:

R1#show ip ospf database external self-originate

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

                Type-5 AS External Link States

  LS age: 1426
  Options: (No TOS-capability, DC, Upward)
  LS Type: AS External Link
  Link State ID: 11.11.11.11 (External Network Number )
  Advertising Router: 1.1.1.1
  LS Seq Number: 80000001
  Checksum: 0xCDA2
  Length: 36
  Network Mask: /32
        Metric Type: 2 (Larger than any link state path)
        MTID: 0 
        Metric: 20 
        Forward Address: 0.0.0.0
        External Route Tag: 0

This is LSA type 5. Let’s break down what we have here:

  • Link State ID is the external network prefix (11.11.11.11). This is what other routers will install in their routing tables.
  • Advertising Router is R1 (1.1.1.1), the ASBR that originated this LSA. This is the value that routers use to look up the matching type 4 LSA.
  • Metric Type is 2 (E2). This is the default for redistributed routes.
  • The metric (cost) is 20.
  • Forward Address is 0.0.0.0, which means traffic should be sent to the ASBR (R1).
The External Route Tag is used for route filtering and loop prevention in mutual redistribution.

R2

Let’s check the other routers. Since LSA type 5 is flooded unchanged throughout the OSPF domain, we should see the same thing on all routers. Here is R2:

R2#show ip ospf database external 11.11.11.11

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

                Type-5 AS External Link States

  LS age: 1483
  Options: (No TOS-capability, DC, Upward)
  LS Type: AS External Link
  Link State ID: 11.11.11.11 (External Network Number )
  Advertising Router: 1.1.1.1
  LS Seq Number: 80000001
  Checksum: 0xCDA2
  Length: 36
  Network Mask: /32
        Metric Type: 2 (Larger than any link state path)
        MTID: 0 
        Metric: 20 
        Forward Address: 0.0.0.0
        External Route Tag: 0

The LSA is the same as the one R1 originated.

R3

Same thing on R3:

R3#show ip ospf database external 11.11.11.11

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

                Type-5 AS External Link States

  LS age: 1688
  Options: (No TOS-capability, DC, Upward)
  LS Type: AS External Link
  Link State ID: 11.11.11.11 (External Network Number )
  Advertising Router: 1.1.1.1
  LS Seq Number: 80000001
  Checksum: 0xCDA2
  Length: 36
  Network Mask: /32
        Metric Type: 2 (Larger than any link state path)
        MTID: 0 
        Metric: 20 
        Forward Address: 0.0.0.0
        External Route Tag: 0

R4

And also on R4:

We're Sorry, Full Content Access is for Members Only...

If you like to keep on reading, become a member now!

  • Learn CCNA, CCNP and CCIE R&S. Explained As Simple As Possible.
  • Try for Just $1. The Best Dollar You've Ever Spent on Your Cisco Career!
  • Full Access to our 807 Lessons. More Lessons Added Every Week!
  • Content created by Rene Molenaar (CCIE #41726)
2203 Sign Ups in the last 30 days
satisfaction-guaranteed
  • 100% Satisfaction Guaranteed!
  • You may cancel your monthly membership at any time.
  • No Questions Asked!