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

br//
zamam

0 Likes

(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.

Rene

0 Likes

(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 ??

0 Likes

(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!

Laz

1 Like

(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.

//BR
Waqar

0 Likes

(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!

Laz

0 Likes

(Mohammad W) #47

Hi laz,

Great explanation.
Thanks

//BR
Waqar

1 Like

(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

Regards
Markos

0 Likes

(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”)

Rene

0 Likes

(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?

Thanks,
Naresh

0 Likes

(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!

Laz

0 Likes

(KUNAL N) #52

What happen if OSPF neighbors do not get LSA after 30 Minutes?

0 Likes

(Lazaros Agapides) #53

Hello Kunal

OSPF has various constants. One of these is the LSRefreshTime which is 30 minutes. A neighbor will send out a new LSA every 30 minutes if there is no change in the network topology. Now this is a timer that a router will use to retransmit LSAs. There is another timer called MaxAge which is set to 1 hour. If an LSA is in the database and no new refreshes of this same LSA have come in for an hour, then the LSA is no longer used in the routing table calculation, and is essentially disregarded. More about this mechanism can be found in the RFC 2328 of OSPF here.

So to answer your question, after 30 minutes if an LSA is not received, nothing happens. OSPF routers continue to function until the 1 hour mark is hit, at which time, the LSA is flushed from the link state database and is no longer used for routing calculations.

I hope this has been helpful!

Laz

0 Likes

(Marcel H) #54

Hi together,

I know that under normal circumstances this shouldn’t happen but what exactly happens when a LSA goes back to 0x80000001.

If I understand that correct the neighbor holding the “old” information has a higher sequence number so it will inform the originating router that has the “newer” information that his “old” information is “new”.
How is this handled in OSPF.
Is there any description within the RFC ?

Best regards,
Marcel

0 Likes

(Trust_the P) #55

Hello @marcel.hofheinz,

You can go through this
–> https://tools.ietf.org/html/rfc2328

1 Like

(Lazaros Agapides) #56

Hello Marcel

If this occurs, then OSPF will consider the new information as older than the old information. In other words, it will look at the 0x80000001 value and consider it old and will not replace the current information. As you said, there is no way that this can take place. An OSPF topology would have to be functioning for over 600 years in order for this to happen. Take a look at the following post for more information.

I hope this has been helpful!

Laz

1 Like