Home > OSPF LSA Types Lab

OSPF LSA Types Lab

April 27th, 2014 in Basic Labs Go to comments

In this lab we will learn when different types of LSA will be created. The main topic of this lab is LSA Types 1, 2, 3, 4, 5, 7. If you need to review your OSPF LSA Types knowledge, we recommend you to read our OSPF LSA Types Tutorial first.

Lab topology

OSPF_LSA_Types_Topology.jpg

You can download the initial configuration file of this lab here: http://www.digitaltut.com/download/OSPF_LSA_Types_Initial.zip.

Initial Configuration

R1:
int f0/0
ip address 12.12.12.1 255.255.255.0
no shut
int f0/1
ip address 15.15.15.1 255.255.255.0
no shut
router ospf 1
router-id 1.1.1.1
net 12.12.12.0 0.0.0.255 area 0
net 15.15.15.0 0.0.0.255 area 0
R2:
int f0/0
ip address 12.12.12.2 255.255.255.0
no shut
int f0/1
ip address 23.23.23.2 255.255.255.0
no shut
int f1/0
ip address 24.24.24.2 255.255.255.0
no shut
router ospf 1
router-id 2.2.2.2
net 12.12.12.0 0.0.0.255 area 0
net 23.23.23.0 0.0.0.255 area 1
net 24.24.24.0 0.0.0.255 area 1
R3:
int f0/0
ip address 23.23.23.3 255.255.255.0
no shut
int s0/0
ip address 38.38.38.3 255.255.255.0
no shut
router ospf 1
router-id 3.3.3.3
net 23.23.23.0 0.0.0.255 area 1
router eigrp 100
net 38.38.38.0
no auto-summary
R4:
int f0/0
ip address 24.24.24.4 255.255.255.0
no shut
router ospf 1
router-id 4.4.4.4
net 24.24.24.0 0.0.0.255 area 1
R5:
int f0/0
ip address 15.15.15.5 255.255.255.0
no shut
int f0/1
ip address 56.56.56.5 255.255.255.0
no shut
int f1/0
ip address 57.57.57.5 255.255.255.0
no shut
router ospf 1
router-id 5.5.5.5
net 15.15.15.0 0.0.0.255 area 0
net 56.56.56.0 0.0.0.255 area 2
net 57.57.57.0 0.0.0.255 area 2
R6:
int f0/0
ip address 56.56.56.6 255.255.255.0
no shut
router ospf 1
router-id 6.6.6.6
net 56.56.56.0 0.0.0.255 area 2
R7:
int f0/0
ip address 57.57.57.7 255.255.255.0
no shut
router ospf 1
router-id 7.7.7.7
net 57.57.57.0 0.0.0.255 area 2
R8:
int s0/0
ip address 38.38.38.8 255.255.255.0
no shut
int lo0
ip address 8.8.8.8 255.255.255.255
router eigrp 100
network 8.0.0.0
network 38.38.38.0
no auto-summary

The initial configuration above only assigns IP addresses to interfaces and turn on OSPF on R1 to R7 and EIGRP on R8. The IP addresses of two connected interfaces are in the form of xy.xy.xy.x/24 and xy.xy.xy.y/24 where x, y are the router numbers. All the OSPF routers have router-ids in the form of x.x.x.x. Please notice that we have not redistributed EIGRP routes to OSPF domain yet.

LSA Types 1, 2 and 3

In this topology we have three areas 0, 1 and 2 so we can see the first three LSA types. On R7 use the “show ip ospf database” command to view the information related to OSPF database on R7:

OSPF_LSA_Types_Initial_R7_show_ip_ospf_database.jpg

The Link IDs of Type 1 LSA are the originating router IDs. LSAs Type 1 are only sent among OSPF routers in the same area so we see R5, R6 and R7 here which are in Area 2 only.

The Link IDs of Type 2 LSA are the IP interface addresses of the DRs. So here we know R5 and R7 are the DRs. If you want to verify, you can check it with the “show ip ospf neighbor” command.

OSPF_LSA_Types_Initial_R5_show_ip_ospf_neighbor.jpg

Please notice that in this case R5 is the DR for the R5-R6 segment (because we see R6 is the BDR so we can deduce R5 is the DR) and R7 is the DR for R5-R7 segment.

The Link IDs of Type 3 LSA are the destination network addresses. They give information about every segment in our network outside of its area.

“ADV router” is the router that is advertising that information.

 

OSPF_LSAs_Types_3.jpg

The OSPF database of R4 is similar to that of R7 with three LSA Types 1, 2 and 3.

OSPF_LSA_Types_Initial_R4_show_ip_ospf_database.jpg

LSA Types 4, 5

R3:

router ospf 1
redistribute eigrp 100 subnets

After redistributing from EIGRP to OSPF, LSAs Type 4 & 5 have been created and we can see them on R7:

OSPF_LSA_Types_After_Redistribute_R7_show_ip_ospf_database.jpg

The LSAs Type 4 are generated to describe the ASBR (3.3.3.3) and the ADV (Advertising) Router is R5 (5.5.5.5). R5 sends this LSA to Area 2 to inform all routers inside this area that they can reach the mentioned ASBR through it. The Link ID of LSA Type 4 is the router ID of the described ASBR. This Type of LSA is used to support LSA Type 5 when routers from other areas want to send traffic to the external routes. For example, although R7 knows the Advertising router for the network 38.38.38.0 is R3 (3.3.3.3) via Type 5 LSA but it does not know how to reach R3. It can check LSA Type 4 and see the ADV Router for R3 is R5 (5.5.5.5) so it will forward traffic to R5. Because R7 and R5 are in the same area so R7 will surely know how to reach R5 via LSA Type 1. The pictures below show how LSA Type 4 & 5 are sent out to other areas.

OSPF_LSAs_Types_4.jpg

OSPF_LSAs_Types_5.jpg

In the topology above we can see LSAs Type 4 are not sent to the routers inside the area where the ASBR belongs to. R4 only has LSA Type 5 as shown below:

OSPF_LSA_Types_After_Redistribute_R4_show_ip_ospf_database.jpg

The reason for the absence of LSA Type 4 is R4 has already known how to reach the ASBR R3 because they are in the same area. Therefore LSA Type 4 is not necessary here.

If you want to check LSA Type 5 only, use the “show ip ospf database external” command:

OSPF_LSA_Types_After_Redistribute_R4_show_ip_ospf_database_external.jpg

There is a field named “Forward Address” which is 0.0.0.0 in the output above. “0.0.0.0” here means traffic for the advertised destination should be forwarded to the advertising router (R3, 3.3.3.3, in this case).

For LSA Type 4 only, use the “show ip ospf database asbr-summary” command:

OSPF_LSA_Types_After_Redistribute_R4_show_ip_ospf_database_asbr_summary.jpg

R4 does not receive LSA Type 4 so above field is empty.

In the next part we will continue learning about LSA Type 5 and Type 7.

Comments
  1. The
    August 30th, 2016

    Thankyou honestly.

  2. The
    August 30th, 2016

    Thankyou honestly.

  3. kk
    September 15th, 2016

    great

  4. monte
    September 17th, 2016

    Gents, great work. One suggestion. You should add the steps to redistribute ospf 1 into eigrp 100 at Router 3 so that all the routers can trace and ping… may further enhance the exercise, did for me

  5. Anonymous
    November 11th, 2016

    Awesome tutorial, absolutely brilliant..

  6. Lalit Sharma
    January 28th, 2017

    Fantabulous, never seen such a great explanation….
    One thing to add after changing Area 1 as NSSA the Link ID in LSA 4 has changed from 3.3.3.3 to 2.2.2.2 on router 7 and also forward address changed to 23.23.23.3, any guess ?

  7. TT
    February 14th, 2017

    Awesome explanation. I’ve simulated your configuration and was able to follow through.. This ‘s definitely the best Tutorial of LSA Type that I have seen so far.. Thank you so much.

  8. GP
    March 6th, 2017

    very good stuff, well thought out and demonstrated

  9. Red1
    April 21st, 2017

    Excellent explanation thanks.

  1. No trackbacks yet.