Hi Everybody. Hope you are in the pink of your health, as you are trying to learn more and more about Networking.
As a rewind, please go through my last post which explains Type-1 and 2 Router LSA of OSPF. Today I will embark on explaining Type-3, 4 and 5 with straight-forward examples. I am hoping you will understand it quite easily.

type3_4_5

Please refer to the above diagram to understand the below better.

Step1: I just enabled ospf globally and on the physical link on PE1

PE1#show ip ospf database

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

Router Link States (Area 0)

Link ID ADV Router Age Seq# Checksum Link count
1.1.1.1 1.1.1.1 9 0x80000002 0x0044C3 2
PE1#show ip ospf database router
PE1#show ip ospf database router

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

Router Link States (Area 0)

LS age: 20
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: 80000002
Checksum: 0x44C3
Length: 48
Number of Links: 2

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 MTID metrics: 0
TOS 0 Metrics: 1

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

 

Step 2: I enabled OSPF on P2 now and also on the interface between PE1 and P2 keeping them in the same area, which is the Backbone area.

PE1#show ip ospf database

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

Router Link States (Area 0)

Link ID ADV Router Age Seq# Checksum Link count
1.1.1.1 1.1.1.1 48 0x80000003 0x006F8A 2
2.2.2.2 2.2.2.2 46 0x80000003 0x005F8D 2

Net Link States (Area 0)

Link ID ADV Router Age Seq# Checksum
10.1.1.1 1.1.1.1 48 0x80000001 0x0064B8

PE1#show ip ospf database network

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

Net Link States (Area 0)

LS age: 64
Options: (No TOS-capability, DC)
LS Type: Network Links
Link State ID: 10.1.1.1 (address of Designated Router)
Advertising Router: 1.1.1.1
LS Seq Number: 80000001
Checksum: 0x64B8
Length: 32
Network Mask: /24
Attached Router: 1.1.1.1
Attached Router: 2.2.2.2

 

Step 3: I enabled OSPF on PE2 and on the interface between P2 and PE2 keeping them in a different area. Now, this will introduce the Type-3 LSA or the Summary LSA. P2 or 2.2.2.2 becomes the ABR who generates this LSA.

These LSAs are stored in PE1 as it belongs to Area 0 only.

 

PE1#show ip ospf database

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

Router Link States (Area 0)

Link ID ADV Router Age Seq# Checksum Link count
1.1.1.1 1.1.1.1 155 0x80000003 0x006F8A 2
2.2.2.2 2.2.2.2 7 0x80000004 0x00608A 2

Net Link States (Area 0)

Link ID ADV Router Age Seq# Checksum
10.1.1.1 1.1.1.1 155 0x80000001 0x0064B8

Summary Net Link States (Area 0)

Link ID ADV Router Age Seq# Checksum
20.1.1.0 2.2.2.2 2 0x80000001 0x003BE2

 

These LSAs are stored in P2 as it is an ABR and belongs to both Area 0 and 1

 

P2#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
1.1.1.1 1.1.1.1 203 0x80000003 0x006F8A 2
2.2.2.2 2.2.2.2 53 0x80000004 0x00608A 2

Net Link States (Area 0)

Link ID ADV Router Age Seq# Checksum
10.1.1.1 1.1.1.1 203 0x80000001 0x0064B8

Summary Net Link States (Area 0)

Link ID ADV Router Age Seq# Checksum
20.1.1.0 2.2.2.2 48 0x80000001 0x003BE2

Router Link States (Area 1)

Link ID ADV Router Age Seq# Checksum Link count
2.2.2.2 2.2.2.2 12 0x80000002 0x000EE3 1
3.3.3.3 3.3.3.3 13 0x80000002 0x00B337 1

Net Link States (Area 1)

Link ID ADV Router Age Seq# Checksum
20.1.1.1 3.3.3.3 13 0x80000001 0x00E919

Summary Net Link States (Area 1)

Link ID ADV Router Age Seq# Checksum
1.1.1.1 2.2.2.2 48 0x80000002 0x0031FC
2.2.2.2 2.2.2.2 48 0x80000002 0x00F832
3.3.3.3 3.3.3.3 71 0x80000001 0x00AE75
10.1.1.0 2.2.2.2 48 0x80000002 0x00BB6B

 

Step 4: Now, we will introduce Type-4 and Type-5 LSAs. I have configured ISIS between PE2 and P1 and redistributed it into OSPF. This makes my PE2 as the ASBR considering OSPF and ISIS are in different ASs. So, the ASBR or PE2 generates a Type-5 LSA or External LSA as shown below:

 

PE2#show ip ospf database external

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

Type-5 AS External Link States

LS age: 232
Options: (No TOS-capability, DC, Upward)
LS Type: AS External Link
Link State ID: 4.4.4.4 (External Network Number )
Advertising Router: 3.3.3.3
LS Seq Number: 80000001
Checksum: 0xD4AF
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

 

While, the ABR which is P2 generates a Type-4 LSA or ASBR Summary LSA as shown below.

 

P2#show ip ospf database asbr-summary

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

Summary ASB Link States (Area 0)

LS age: 133
Options: (No TOS-capability, DC, Upward)
LS Type: Summary Links(AS Boundary Router)
Link State ID: 3.3.3.3 (AS Boundary Router address)
Advertising Router: 2.2.2.2
LS Seq Number: 80000001
Checksum: 0xBE68
Length: 28
Network Mask: /0
MTID: 0 Metric: 1

 

This gives me the information of where and who the ASBR is!
So, the ASBR is 3.3.3.3 and it is 1 “Metric” away. As an exercise to understand the Type-4 LSA better I changed the cost of the link from default cost of 1 to 2 between the ABR and the ASBR and then cleared the OSPF process, the output becomes:

 

P2#show ip ospf database asbr-summary

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

Summary ASB Link States (Area 0)

LS age: 0
Options: (No TOS-capability, DC, Upward)
LS Type: Summary Links(AS Boundary Router)
Link State ID: 3.3.3.3 (AS Boundary Router address)
Advertising Router: 2.2.2.2
LS Seq Number: 80000001
Checksum: 0xC85D
Length: 28
Network Mask: /0
MTID: 0 Metric: 2

So, now the ASBR is 2 “Metric” away from the ABR as per the Type-4 LSA.

So I believe I have managed to explain the three important LSAs in this post today. Please respond back in comments with doubts or mistakes in my post, we can talk it out.

~ Adios!