OSPF LSAs and LSDB flooding Tutorial

Hi, Laz.

Thanks for the reply, it is really helpful. Do you know where I can read this information? I’ve been looking in google but cannot find an article on this.

John

Hello John

I would like to apologize as my previous post was incorrect. If you look at Rene’s lesson and follow the logic of the flow chart, you will see that if a new LSA comes in because of an expired aging timer, the sequence number will be incremented. An incremented sequence number means that the LSA is added to the LSDB and the SFP is recalculated even if the information in the LSA remains the same.

Once again, I apologize and i hope this answers your questions sufficiently.

I hope this has been helpful!

Laz

2 Likes

Hi, Laz.

Thanks for the clarification.

Then all routers will do the recalculation even if only the sequence number has changed and not the LSA contents. Isn’t that counter productive? :slight_smile: Do you know any documentation that discussing this part in details?

John

Hello John

Yes, that does sound counterproductive, however, remember that it is done every 30 minutes which for network time, is considered almost an eternity. This is further discussed in OSPF’s RFC (RFC 2328) and can be seen especially when discussing the LSRefreshTime timer. You can search for this term in the RFC and see how it is referenced and used.

You can also take a look at this link to a Cisco publication on TCP/IP routing, which discusses how this timer is staggered across multiple LSAs so that they don’t expire all at once, but is spread out in a semi-random pattern.

I hope this has been helpful!

Laz

Hi,
What does it mean by “If the link-state age is much younger.”
Thanks

Hello Sims

Each LSA has an aging timer which carries the link-state age field. This is a timer that starts counting from the moment an LSA is generated by a router. By default each OSPF LSA is only valid for 30 minutes. If the link-state age reaches 30 minutes and it expires, then the router that created the LSA will resend the LSA and increase the sequence number.

So one of the characteristics that is used to determine if an LSA is more recent is the use of this link-state age timer, and if it is “younger” or smaller in age, then it is considered more recent.

I hope this has been helpful!

Laz

Hi Rene,

Thanks for the Lesson… you told max age timer of LSA is 60 mins. and in every 30 minutes routers sends LSA to make LSDB updated. What is the difference between these two.

Thanks…

Hello Pushpender

There are two timers involved in this procedure. Their official names, based on RFC 2328 where OSPF is defined are:

  • LSRefreshTime which is set to 30 minutes and is counted by the router that sent the LSA
  • MaxAge which is set to 60 minutes and is counted by the router that receives the LSA

In the lesson, Rene is speaking about the LSRefreshTime of the sender of the LSA. If R1 sends an LSA to R2, it begins counting this timer. If the timer on R1 reaches 30 minutes and there is no update within that time, then R1 will resend the LSA.

The MaxAge timer is measured by the receiving router. So if R2 receives an LSA from R1, it will begin this timer. It will keep the LSA there for up to one hour before discarding it.

You can see the LSRefreshTime and MaxAge timers in the RFC for more information.

I hope this has been helpful!

Laz

Every 30 minutes there will be the re-Calculate of SPF even if there is no change , Am i right ?.

Lets say, there is no change in the network and the router sends a LSA just before the expire of lsa refresh timer, in that case when the router will receive the LSA, What it does with that LSA if the sequence numbers are same ?,does routers send the LSA with same seq no. or +1 with current seq.no ?

rene said, the new lsa are being determined by based on multiple things like Seqno,Age,Checksum, But major documents of OSPF states that only SEQno, to identify which are new and OLD lsa?.

In which case the duplicate LSA can be sent by a router with the same seqno,age,Checksum,Age ?..Do mean duplicate mean all these field has be same or only seq no.??

How router process those lsa if it recived a new LSA and also how it processes the OLD LSA ??

Hello Narad

Section 13.1 Determining which LSA is newer of RFC 2328 which describes OSPFv2 indicates how OSPF routers determine which LSA is the most recent, and this includes all of the factors that Rene has mentioned in the lesson. You can find this at the link below:

In addition, you can find information that will answer your questions in this post as well.

I hope this has been helpful!

Laz

Hello,

In the flow chart shown for this lesson, I don’t see any reason to mention “sequence no different” and “sequence no higher” when we can simply say “Is sequence number different?” and “Is sequence number higher?” Can we please change it unless by “no” you mean “number” and if that is the case then the correct abbreviation for number is “no.”

Makes it easier to understand I feel.

Regards,
Rahul

Hello Rahul

Indeed, the statements are:

  • Sequence Number different?
  • Sequence Number higher?

I will let Rene know to make the flow chart clearer in this.

Thanks for pointing this out!

Laz

1 Like

HI Rene !
Hope you are well…!
I have a question. What happen If router received a LSA due a link change in the topology before 30 min expires. Does it reset the time or the the timer continue on until it reach to 30 min.
Can you clarify it to me please ?
Thanks Sasindu.

Hello Sasindu

The link-state age field is reset every time a new LSA arrives. The maximum age of the link-state age field is 30 minutes. After 30 minutes if no new LSAs arrive, any existing LSAs are considered invalid. For this reason, LSAs are resent every 30 minutes.

However, the link-state age field is reset every time a new LSA arrives.

Keep in mind that in a stable OSPF topology, no new LSAs will be sent. For this reason, it is likely that you will see LSAs expiring and being resent after 30 minutes.

I hope this has been helpful!

Laz

This statement is not clear to me "If the LSA is already in the LSDB and the sequence number is the same " . How can sequence number be same,if we send update LSA sequence number will increase right?

2nd doubt: LSA is more recent. It will consider the LSA to be more recent if it has:

A higher sequence number.
A higher checksum number.
An age equal to the maximum age.
I am not sure why we are saying maximum age here , because when we send new LSA we will send with lower age (0 )right.

Hello Rahul

You are correct that under normal OSPF operation, there is no expected situation in which you will receive the same LSA with the same sequence number. However, the algorithm that maintains the OSPF LSDB must account for every eventuality. There are rare occasions where this may actually take place. For example, in section 13.4 of the OSPF RFC 2328, it refers to situations in which a router may receive self-originated LSAs, meaning such LSAs can still circulate within an OSPF area and be received a second time by a router, resulting in the situation where the same LSA with the same sequence number is received by an OSPF router.

Indeed, the RFC states that an LSA that has an age of MaxAge is not used in the routing table calculation. I will let Rene know to take a look at this and see if he can clarify what is meant by this.

Thanks again!

I hope this has been helpful!

Laz

In CCNP Encor 350-401, 2.3 OSPF - LSA and LSDB Flooding -
you mentioned first OSPF packet as 0x80000001 (8-digit hexa i.e. 32-bits) and last packet as 0x7FFFFFFF (8-digit hexa).
How can 0x7FFFFFFF (8-digit hexa) be the last packet and 0x80000001 (8-digit hexa) be the first packet ?
Regards
C Joshi

Hello Joshi

Take a look at this post:

I hope this has been helpful!

Laz

@lagapidis @ReneMolenaar

i have a doubt about LSDB Flooding , specifically about LSA Type 3. DR/BDR also flood this LSA Type 3 ? and if the answer is yes, if we have an ABR , and this ABR has a multi-access networking in a non-backbone area, is a best practice that the ABR also has to be a DR ?

My doubt is because this table :


source : https://community.cisco.com/t5/networking-knowledge-base/reading-and-understanding-the-ospf-database/ta-p/3145995

Regarding the DR/BDR role this table says DR/BDR only collects LSAs Type 1 and send a single LSA Type 2 to the DROthers … I apologize if my question is a little confuse, but i wonder how the ABR role + DR role and LSDB Flooding fits together.

Hello Juan

An ABR can also play the role of a DR, or it may not. There is no best practice that says that an ABR should be configured to be the DR or not. Think about it this way. An ABR will send out a Type 3 Summary LSA to a neighboring area. A Type 3 LSA contains information about routes in an area other than the one the Type 3 LSA has been advertised to. For example, take a look again at this diagram from the lesson:

Notice that R2 is advertising a Type 3 LSA into Area 0 via Gi0/1, but that LSA contains information about routes in Area 2. So the Type 3 LSA contains information about routes outside of the area in which the LSA has been advertised.

A Type 2 LSA on the other hand is advertised by a DR on Gi0/0 to routers in the same area as the routes it contains. If R2 in the above diagram is a DR for its interface in Area 2, then any Type 2 LSAs that are generated consist of information about routes only within Area 2.

To summarize, if R2 is a DR on the network segment connected to its interface Gi0/0 , it will send out Type 2 LSAs from Gi0/0, and Type 3 LSAs about area 2 out of Gi0/1.

I hope this has been helpful!

Laz

1 Like