OSPF LSAs and LSDB flooding Tutorial

How exactly does OSPF fill the LSDB? Let’s zoom in on the operation of how OSPF keeps its link-state database up-to-date:

OSPF LSA LSDB flooding

Each LSA has an aging timer which carries the link-state age field. By default each OSPF LSA is only valid for 30 minutes. If the LSA expires then the router that created the LSA will resend the LSA and increase the sequence number.  

Let’s walk through this flowchart together. In this example a new LSA is arriving at the router and OSPF has to decide what to do with it:

  1. If the LSA isn’t already in the LSDB it will be added and a LSAck (acknowledgement) will be sent to the OSPF neighbor. The LSA will be flooded to all other OSPF neighbors and we have to run SPF to update our routing table.
  2. If the LSA is already in the LSDB and the sequence number is the same then we will ignore the LSA.
  3. If the LSA is already in the LSDB and the sequence number is different then we have to take action:
    1. If the sequence number is higher it means this information is newer and we have to add it to our LSDB.
    2. If the sequence number is lower it means our OSPF neighbor has an old LSA and we should help them. We will send a LSU (Link state update) including the newer LSA to our OSPF neighbor. The LSU is an envelope that can carry multiple LSAs in it.

It’s not just the sequence number that OSPF will look at to determine if a LSA is more recent. It will consider the LSA to be more recent if it has:

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)

542 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. thanks again for this clarification much appreciated :slight_smile:

    need to look into this as we are getting a lot of MaxAge Lsa approx ever hour or more.

  2. Hello Azeem!

    This is a very good question and indicates that you are thinking very deeply of the reasons behind specific functionalities of OSPF. Yes, it does make sense to assume that if there is no change to the network, then at the end of the sequence you describe, it should not need to go to Step A. However, it is important to realise the purpose of the sending of the LSA every 30 minutes in order to answer this question.

    When LSAs are sent because of a topology change, the sequence number is incremented. This indicates that the LSA contains newer inform

    ... Continue reading in our forum

  3. Hello Mohammad

    If we see one prefix in the database that is continuously changing the sequence number, then this means that for some reason, a route is flapping on the network. This is usually due to a routing loop that may occur not within an area, but via multipoint redistribution, that is, when a route is redistributed into another AS and then it is re-redistributed back into the original AS from another redistribution point. Solutions to such problems include route tagging which is explained further in this lesson:


    ... Continue reading in our forum

  4. Hi laz,

    Great explanation.


  5. Hello Naresh

    If you put these numbers into a Hex to Decimal converter, you’ll see that you end up with
    0x80000001 = 2147483649
    0x7FFFFFFF = 2147483647

    This looks strange. Actually, it looks completely incorrect!! The reason these numbers are used is because the LSA sequence numbers are signed. That is, they include a negative or positive sign which is indicated by the very first of the 32 bits. The LSA sequence numbers will start with 0x80000001 which is compared to binary below:

    Hex       0x8  0    0    0    0    0    0    1
    Binary    1000 0000 0000 000
    ... Continue reading in our forum

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