Sometimes we have the need to inject information from external sources into OSPF routing domain. When inserted into OSPF, this information is is carried by External (Type 5) LSA. In some cases, crucial piece of information is missing and needs to be supplied in addition to Type 5. This is the role of ASBR-Summary (Type 4) LSA.
Network Configuration
We will use, by now very familiar, network depicted on the diagram below to explore these two LSA types.

In this instance, R1 is injecting its Loopback1 interface with the address 11.11.11.11/32 as the external network into area 145. Let’s take a look at the relevant configuration of all the routers in our network. For the reason I will explain later, R1 will not be advertising its own Loopback0 into OSPF at all.
R1:
interface Loopback1 ip address 11.11.11.11 255.255.255.255 ! interface FastEthernet0/0 ip address 145.145.145.1 255.255.255.0 ! route-map CON-to-OSPF permit 10 match interface Loopback1 ! router ospf 1 router-id 1.1.1.1 redistribute connected subnets route-map CON-to-OSPF network 145.145.145.1 0.0.0.0 area 145 !
R2:
interface Serial0/1/0 ip address 24.24.24.2 255.255.255.0 ! interface Serial0/2/0 ip address 25.25.25.2 255.255.255.0 ! router ospf 1 network 0.0.0.0 255.255.255.255 area 0 !
R4:
interface FastEthernet0/0 ip address 145.145.145.4 255.255.255.0 ! interface Serial0/0/0 ip address 24.24.24.4 255.255.255.0 ! interface Serial0/1/0 ip address 45.45.45.4 255.255.255.0 ! router ospf 1 network 4.4.4.4 0.0.0.0 area 0 network 24.24.24.4 0.0.0.0 area 0 network 45.45.45.4 0.0.0.0 area 0 network 145.145.145.4 0.0.0.0 area 145 !
R5:
interface FastEthernet0/0 ip address 145.145.145.5 255.255.255.0 ip ospf priority 0 ! interface Serial0/0/0 ip address 45.45.45.5 255.255.255.0 ! interface Serial0/2/0 ip address 25.25.25.5 255.255.255.0 ! router ospf 1 network 5.5.5.5 0.0.0.0 area 0 network 25.25.25.5 0.0.0.0 area 0 network 45.45.45.5 0.0.0.0 area 0 network 145.145.145.5 0.0.0.0 area 145 !
Let’s see if we can reach 11.11.11.11 from R2.
R2:
R2#show ip route 11.11.11.11 Routing entry for 11.11.11.11/32 Known via "ospf 1", distance 110, metric 20, type extern 2, forward metric 65 Last update from 25.25.25.5 on Serial0/2/0, 13:35:34 ago Routing Descriptor Blocks: 25.25.25.5, from 1.1.1.1, 13:35:34 ago, via Serial0/2/0 Route metric is 20, traffic share count is 1 * 24.24.24.4, from 1.1.1.1, 13:35:34 ago, via Serial0/1/0 Route metric is 20, traffic share count is 1 R2#ping 11.11.11.11 source Loopback0 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 11.11.11.11, timeout is 2 seconds: Packet sent with a source address of 2.2.2.2 !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 8/8/8 ms
It works, but let’s see how and why.
Exploring the Database
We know from the configuration that R1 is redistributing Loopback1 into OSPF. Let’s examine how this appears on R4.
R4:
R4#show ip ospf database ? adv-router Advertising Router link states asbr-summary ASBR summary link states database-summary Summary of database external External link states network Network link states nssa-external NSSA External link states opaque-area Opaque Area link states opaque-as Opaque AS link states opaque-link Opaque Link-Local link states router Router link states self-originate Self-originated link states summary Network summary link states | Output modifiers <cr>
Information about External (Type 5) LSA can be read using “external” keyword for “show ip ospf database” command.
R4#show ip ospf database external OSPF Router with ID (4.4.4.4) (Process ID 1) Type-5 AS External Link States Routing Bit Set on this LSA LS age: 713 Options: (No TOS-capability, DC) LS Type: AS External Link Link State ID: 11.11.11.11 (External Network Number ) Advertising Router: 1.1.1.1 LS Seq Number: 80000019 Checksum: 0x9DBA Length: 36 Network Mask: /32 Metric Type: 2 (Larger than any link state path) TOS: 0 Metric: 20 Forward Address: 0.0.0.0 External Route Tag: 0
When you see multicolored highlights as are those above, you know I have some explaining to do.
Lines highlighted yellow indicate the network being advertised. You can see that network and mask information are separated in output. It’s important to be able to follow that. Information highlighted magenta indicates the router that originated this LSA. In our case, this is R1. This is where things get a little bit complicated.
I mentioned that R1 is not advertising its Loopback0 to OSPF. Let’s confirm that.
R4
R4#show ip route 1.1.1.1
% Network not in table
Even though the same as Loopback0 address, Router ID 1.1.1.1 on R1 is just a number. If we examine database on R4, we can see that we know how to reach that Router ID.
R4:
R4#show ip ospf database router 1.1.1.1
OSPF Router with ID (4.4.4.4) (Process ID 1)
Router Link States (Area 145)
Routing Bit Set on this LSA
LS age: 1210
Options: (No TOS-capability, DC)
LS Type: Router Links
Link State ID: 1.1.1.1
Advertising Router: 1.1.1.1
LS Seq Number: 80000026
Checksum: 0x9107
Length: 36
AS Boundary Router
Number of Links: 1
Link connected to: a Transit Network
(Link ID) Designated Router address: 145.145.145.1
(Link Data) Router Interface address: 145.145.145.1
Number of TOS metrics: 0
TOS 0 Metrics: 1
None of the links carry that IP, but we know about that router. Therefore, LSA received by R4 is valid. Before I move on, let’s just touch a bit on the lines highlighted cyan. This is external metric. We know that OSPF external routes can have two types of metrics – type 1 and type 2. We can see that this particular prefix is advertised with an external metric type 2 with metric 20.
Multiarea OSPF
In our network, we have two ABRs – R4 and R5 and two area routers. R1 in area 145 and R2 in area 0. We saw how the external route injected by R1 appears on ABR R4, but how does it look like on R2? Let’s take a look.
R2:
R2#show ip ospf database external OSPF Router with ID (2.2.2.2) (Process ID 1) Type-5 AS External Link States Routing Bit Set on this LSA LS age: 1729 Options: (No TOS-capability, DC) LS Type: AS External Link Link State ID: 11.11.11.11 (External Network Number ) Advertising Router: 1.1.1.1 LS Seq Number: 8000001A Checksum: 0x9BBB Length: 36 Network Mask: /32 Metric Type: 2 (Larger than any link state path) TOS: 0 Metric: 20 Forward Address: 0.0.0.0 External Route Tag: 0
This is interesting. We can see that advertising router for this LSA is R1. That router is in another area and R2 has no idea whatsoever about it.
R2
R2#show ip ospf database router 1.1.1.1
OSPF Router with ID (2.2.2.2) (Process ID 1)
This is a problem, yet we know the network works. How does the R2 know how to reach R1′s ROuter ID, when it’s in another area? Let’s quickly examine the database and see if we can spot something of interest.
R2:
R2#show ip ospf database OSPF Router with ID (2.2.2.2) (Process ID 1) Router Link States (Area 0) Link ID ADV Router Age Seq# Checksum Link count 2.2.2.2 2.2.2.2 836 0x80000030 0x004717 5 4.4.4.4 4.4.4.4 402 0x8000003B 0x004085 5 5.5.5.5 5.5.5.5 299 0x80000033 0x005964 5 Summary Net Link States (Area 0) Link ID ADV Router Age Seq# Checksum 145.145.145.0 4.4.4.4 402 0x8000001B 0x006EEE 145.145.145.0 5.5.5.5 1079 0x8000001C 0x004E0A Summary ASB Link States (Area 0) Link ID ADV Router Age Seq# Checksum 1.1.1.1 4.4.4.4 402 0x8000001B 0x00AA62 1.1.1.1 5.5.5.5 299 0x8000001B 0x008C7C Type-5 AS External Link States Link ID ADV Router Age Seq# Checksum Tag 11.11.11.11 1.1.1.1 1888 0x8000001A 0x009BBB 0
Even though we don’t have Type 1 LSAs originated by R1 itself, we have information about R1, originated by both of our ABR routers. These are ASBR-summary (Type 4) LSAs. To see what’s in that information, we will use the appropriate keyword to “show ip ospf database” command.
R2:
R2#show ip ospf database ? adv-router Advertising Router link states asbr-summary ASBR summary link states database-summary Summary of database external External link states network Network link states nssa-external NSSA External link states opaque-area Opaque Area link states opaque-as Opaque AS link states opaque-link Opaque Link-Local link states router Router link states self-originate Self-originated link states summary Network summary link states | Output modifiers <cr>
Let’s take a look into information, originated by R4.
R2:
R2#show ip ospf database asbr-summary adv-router 4.4.4.4 OSPF Router with ID (2.2.2.2) (Process ID 1) Summary ASB Link States (Area 0) Routing Bit Set on this LSA LS age: 829 Options: (No TOS-capability, DC, Upward) LS Type: Summary Links(AS Boundary Router) Link State ID: 1.1.1.1 (AS Boundary Router address) Advertising Router: 4.4.4.4 LS Seq Number: 8000001B Checksum: 0xAA62 Length: 28 Network Mask: /0 TOS: 0 Metric: 1
We can see above that R4 is telling us that OSPF Router ID 1.1.1.1, which is an ASBR, can be reached through it. Note that the mask is not /32, but /0. Since Router ID is not an IP address, this is perfectly appropriate.
Essentially, Type 4 LSA provides OSPF with next-next-hop to reach ASBR. Without it, routers in different areas would not be able to calculate the the best path to the external network.
I hope you enjoyed this article. Next time, we will explore NSSA External LSA.
Happy studies!
–
Marko Milivojevic – CCIE #18427
Senior Technical Instructor – IPexpert
Join our Online Study List
Tags: CCIE Routing & Switching, LSA, OSPF








Nicely done Marko. :)
If possible please cover three OSPF topics which are not very well documented in books and at-least Confuses me allot.
1. Suppress FA – What actually this feature is all about, How it works, How to use it and In which circumstances we should use it.
2. Incremental SPF – Although It’s just a matter of a command but I am still finding it hard to visualize it’s affect and how it actually control things inside ospf domain.
3. OSPF Transit Area Capability – How it works, and when to use it.
just awesome explanation i would request you to pls post if possible all ospf topic in that why so i get all info which require for mastering in OSPF protocol
We have already done that. You may want to look around our Technical Library: http://bit.ly/TechLibrary.
–
Marko Milivojevic – CCIE #18427
Senior Technical Instructor – IPexpert
Join our Online Study List
[...] Quick Look Into OSPF Database: External and ASBR-Summary LSA [...]