Introduction to OSPF

OSPF is a link-state routing protocol and it’s one of the routing protocols you need to understand if you want to do the Cisco CCNA, CCNP or CCIE R&S exam(s). In this lesson I’ll explain the basics of OSPF to you and you will learn how and why it works.

Navigation system. Gps. 3d

I don’t know about you but I love my navigation system. The good thing about them is you can just drive and there is no need to look for traffic signs, the bad thing is that I’m absolutely lost when it’s not working. I’m bad at reading maps (or maybe I just don’t like it) and if I had to find my way to some street in any big city I’m doomed.

Link-state routing protocols are like your navigation system, they have a complete map of the network. If you have a full map of the network you can just calculate the shortest path to all the different destinations out there. This is cool because if you know about all the different paths it’s impossible to get a loop since you know everything! The downside is that this is more CPU intensive than a distance vector routing protocol. It’s just like your navigation system…if you calculate a route from New York to Los Angeles it’s going to take a bit longer than when you calculate a route from one street to another street in the same city.

Let’s take a good look at link-state to see what it exactly means:

Routers LSDB LSA

  • Link: That’s the interface of our router.
  • State: Description of the interface and how it’s connected to neighbor routers.

lsa into lsdb

Link-state routing protocols operate by sending link-state advertisements (LSA) to all other link-state routers.

All the routers need to have these link-state advertisements so they can build their link-state database or LSDB. Basically all the link-state advertisements are a piece of the puzzle which builds the LSDB.

If you have a lot of OSPF routers it might not be very efficient that each OSPF router floods its LSAs to all other OSPF routers. Let me show you an example:

OSPF Multi Access Network

Above we have a network with 8 OSPF routers connected on a switch. Each of those routers is going to become OSPF neighbors with all of the other routers…sending hello packets, flooding LSAs and building the LSDB. This is what will happen:

OSPF Full Mesh

We will get a full-mesh of OSPF neighbors. Each router will flood LSAs to all other routers so we will have a lot of OSPF traffic. Is there any way to make this a bit more efficient?

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

If you like to keep on reading, Become a Member Now! Here is why:

  • Learn any CCNA, CCNP and CCIE R&S Topic. Explained As Simple As Possible.
  • Try for Just $1. The Best Dollar You’ve Ever Spent on Your Cisco Career!
  • Full Access to our 739 Lessons. More Lessons Added Every Week!
  • Content created by Rene Molenaar (CCIE #41726)

525 Sign Ups in the last 30 days

100% Satisfaction Guaranteed!
You may cancel your monthly membership at any time.
No Questions Asked!

Tags: , , ,

Forum Replies

  1. Hi Rene,

    I have several questions :-

    1 - Can we have ABR between sub areas or the ABR must be only between backbone area and sub areas ?
    2 - Can we have the ASBR in sub areas or the ASBR must be only in the backbone area ?
    3 - What is the different between saves address space and used address space that you mentioned in the advertisement of loopback interface addresses ? I did not understand that and I have some ambiguity at this point ? can you explain it to me in detail please ?
    4 - what is the benefit of sharing information with OSPF hello packets like Rout

    ... Continue reading in our forum

  2. Thank you so much for your answer and patience.

    I already did what you told me for static routes and I will do the same to redistribute BGP prefix list to OSPF.

    If I already have BGP filters (prefix-list) can I use the same prefix-lilst to create a route-map to filter the networks announce by BGP to OSPF?


    router bgp 65533
     neighbor  remote-as 65533
     neighbor update-source Loopback0
     neighbor prefix-list PRUEBA in
    ip prefix-list PRUEBA permit ip   --> ( I have a lot of prefix list for filtering but that is for tha
    ... Continue reading in our forum

  3. Great Web Lesson Rene!

    Word of advice buy Rene book on CCNP Route. Study the chapters such as I read all of the OSPF chapters through twice. Then I come to the web pages which I buy a year subscription to at a time as its a little cost savings.

    On the web pages especially one like this where Rene has video its great to watch those as added reinforcement.

    For example, First video Rene is talking about all the areas and how OSPF works. he shows you a ABR and ASBR. When he is doing this if you have studied the book first you are seeing LSA type 3 summary ne

    ... Continue reading in our forum

  4. Hello Rene,
    I did a packet capture and was studying Hello packet in ospf.
    My setup here is like this R1------------------------------R2
    I enabled OSPF on R2 first so it started sending Hello packet, then next I configured OSPF on R1 so now R1 also started sending hello packet. Now as soon as R2 got the hello from R1 then it did an ARP saying who is tell So why this ARP happens at first place and I see this ARP happening on R2 only not on R1, my second question.
    I am also attaching the packet capture.hello.pcapng (13.0 KB)

  5. Hello Ravi

    This is an excellent question, it shows that you are thinking analytically and very deeply about these issues.

    When a router sends an OSPF hello packet, it sends it to the multicast address. When R2 receives this packet, one of the pieces of information it receives in the OSPF header is the IP address of the router that sent it.

    Now the next step to establishing a neighbour adjacency is for R2 to respond with a unicast packet sending its router ID and its neighbour list. However, in order to do this, it must encapsulate the response, whic

    ... Continue reading in our forum

164 more replies! Ask a question or join the discussion by visiting our Community Forum