OSPF LSAs and LSDB flooding Tutorial

(Mohammad Hasanuz Zaman) #41

Dear Rene,
Pls pls pls help me…
I have a question “How ospf avoid control plane loop within an area?”. Need your help badly. Thx


(Rene Molenaar) #42

Hi Zaman,

Within an area, all OSPF routers have a synchronized LSDB so they all have the exact same view of the topology of the area. Each router individually runs SPF but since they all agree on what the topology looks like, you won’t have any loops.


(Hussein Samir) #43

Hi Rene,

Can I modify the reflooding time or the max age timer of LSAs or they are fixed and not configurable ??

(Lazaros Agapides) #44

Hello Hussein

From my research I was unable to find any command that changes these timers in any Cisco command references. It seems that they are fixed and defined by RFC 2328 on page 216. They are set to LSRefreshTime = 30 minutes and MaxAge = 60 minutes.

I hope this has been helpful!


(Mohammad W) #45

Hello Rene,

Hope you are doing good,
After seeing the show ip ospf database , we conclude this like if we see one prefix or subnet continuously changing the sequence number, can we say that there is issue with the prefix in this way we can filter our troubleshooting boundary.


(Lazaros Agapides) #46

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:

I hope this has been helpful!


(Mohammad W) #47

Hi laz,

Great explanation.


(MARKOS A) #48

Hello NetworkLessons team

In which case could a router receive a LSA with a sequence number that already has in its database (and finally ignore it)? From what I understand if a router has 2 neighbours that have learned about a LSA (the 2 neighbours), then they will first send a database description packet to the router,who will send a LSR if it does not have the LSA in its databases. So even if the 2 neighbors have the LSA, then the router will see that it has learned it from the one router and will not send LSR to the other router? So, isn’t it correct that the router does not flood the LSAs, but floods the LSAs to neighbors that do not have already the LSA to their database? Thank you


(Rene Molenaar) #49

Hi Markos,

OSPF uses “reliable” flooding which means that when you send an LSA, you expect an ACK in return. If you don’t receive an ACK, we retransmit the LSA. Retransmissions is how you get duplicate LSAs.

If you want some examples, I found a good paper where they describe different scenarios where duplicate LSAs occur. (Look for “Causes of Duplicate-LSA Traffic”)


(Naresh N) #50

Hi Rene,
You mentioned:

“What do the sequence numbers look like for OSPF LSAs?
There are 4 bytes or 32-bits.
Begins with 0x80000001 and ends at 0x7FFFFFFF.”

Why does sequence number ends at a 31 bit number 0x7FFFFFFF not 32 bit number at 0xFFFFFFFF?


(Lazaros Agapides) #51

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 0000 0000 0000 0000 0001

Note the 1 in the leftmost position. This indicates a negative sign, and that digit is not used to denote the number. So 0x80000001 is equal to -1 in decimal. Now as the numbers increment, they actually decrement. What I mean is you start with -1, then -2, -3 etc until you get to -2147483648. Then it goes to 0 and then the numbers increment up to +2147483648 which is 0x7FFFFFFF. Here is this number compared to its binary representation as well:

Hex       0x7  F    F    F    F    F    F    F
Binary    0111 1111 1111 1111 1111 1111 1111 1111

Note the 0 on the left most bit. This indicates a positive ‘+’ number. Once this number is reached, then it goes back to -1 or 0x80000001 and the process continues.

Now all of this is really academic, because increments occur every 30 minutes in a stable network. Never in all the history of networking have these increments wrapped around to the initial sequence number because it will take over 600 years to do so, and OSPF has been around only several decades. :stuck_out_tongue:

I hope this has been helpful!