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:
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:
- 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.
- If the LSA is already in the LSDB and the sequence number is the same then we will ignore the LSA.
- If the LSA is already in the LSDB and the sequence number is different then we have to take action:
- If the sequence number is higher it means this information is newer and we have to add it to our LSDB.
- 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:
thanks again for this clarification much appreciated
need to look into this as we are getting a lot of MaxAge Lsa approx ever hour or more.
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 forumHello 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:
https://networklessons.com/cisco/ccie-ro
... Continue reading in our forumHi laz,
Great explanation.
Thanks
//BR
Waqar
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:
... Continue reading in our forum