cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
8749
Views
80
Helpful
23
Replies

When was DBD(database descriptor) packets sent ?

solemdoms5
Level 1
Level 1

I know DBD packets would be exchanged when establishing adjacency after booting the router .

However after that ,Im not sure how DBD works .So

DBD packets was sent every 30 minutes ?  I mean .

When Router exchange LSDB every 30 minutes , First Do OSPF routers exchange DBD(database descriptor ) packets ?

thank you .

23 Replies 23

John Blakley
VIP Alumni
VIP Alumni

My understanding is when the routers go into an exchange state, the dbd packets are sent to describe the networks that the router knows about to its neighbor. The dbd packet has the lsa headers of its lsdb and it's sent to the neighbor. I believe the master of the master/slave relationship is the one that starts the exchange. After the exchange is done and the neighbors settle into a FULL state, and it would not be sent again unless a topology change happens (a change in the lsdb) or the 30 minute window lapses.

HTH,
John

*** Please rate all useful posts ***

HTH, John *** Please rate all useful posts ***

Hello,

The DBD packets are exchanged only during the initial database synchronization between routers. After the databases have been synchronized, new LSAs are flooded and acknowledged without the need of more DBD packets. That also goes for refreshing and reflooding LSAs.

John, the DBD packets do not describe networks. What they describe are the contents of the sender's link-state database. You have stated correctly that DBD packets contain headers of individual LSAs in the sender's database. Basically, if you think in terms of database systems, every record in a database can be uniquely identified by its primary key. If you want to compare two databases, you do not need to transfer the entire database - rather, you just take the keys and check whether both databases have the same set of keys. If any key is missing, you want to download the entire missing record that is identified by this key. This is the point with DBD packets - when you want to synchronize link-state databases, you first exchange the list of LSA headers that uniquely identify individual LSAs and their revisions. You do not need to transfer entire LSAs at this point. You will request and transfer only those LSAs that are shown to be either missing or newer during this DBD exchange. It is like performing an inventory of a store without actually carrying all goods around, just checking on the titles and counts.

The master/slave relationship proves to be a somewhat complicated concept although the basic idea is easy. The DBD packets have to be transferred reliably and in correct order. However, there is no separate packet type in OSPF that could be used to acknowledge a successful arrival of a DBD packet (the LSAck is used to acknowledge LSUs contents but not the DBD). Therefore, the DBDs are also used to acknowledge themselves in an interesting twist: as they have to be received in order, they are sequenced. Now, one of the two routers that want to synchronize themselves will be the one that is allowed to set and increment the sequence number - the master. The slave will be the one that is required to respond to each DBD packet received from the master by sending its own DBD packet with the same sequence number as the one used in master's DBD. If the slave has nothing to send, it just sends a DBD with an empty body but it still needs to respond to master's DBDs. So the sequence of DBDs would be M(x), S(x), M(x+1), S(x+1), ..., M(x+n), S(x+n). Notice that the Master always sets and increments the sequence number in each subsequent DBD while the Slave merely responds with the same sequence number, acknowledging the arrival of that particular Master's DBD.

Now, the choice of master and slave is not left to chance: at the beginning of the sync procedure, both peers consider themselves masters, and send DBDs to each other, each indicating its own initial sequence number. However, because the Router IDs are unique, the router with the higher Router ID will become the master while the router with the lower Router ID will revert to slave operation, thereby allowing the master to assert its own sequencing. This is the point of the ExStart phase - to exchange a pair of DBD packets and determine the master/slave roles. Then the routers jump into the Exchange phase, sending and receiving DBDs and building a list of LSAs to download from the peer. During the Loading phase, a router requests the missing LSAs from the neighbor, and when all missing LSAs have been downloaded, the state changes to Full.

Once in Full state, no more DBDs are required because at this point, the databases are identical, and all subsequent changes to them can be advertised incrementally by individually sending and acknowledging LSAs using the LSU and LSAck packet types.

I hope this helps a bit. As this is a complex topic (actually, this is one of criticized OSPF properties - its link-state database synchronization is a major part of its complexity), please feel more than welcome to ask further!

Best regards,

Peter

Very good post Peter

John

HTH, John *** Please rate all useful posts ***

Peter Thank you for your reply .

You mentioned it partially but Im not sure .so

I want to confirm one thing .

OSPF routers synchronize their LSDB every 30 minutes . right ?

At that moment , Is DBD packets exchanged first ?

( then If no changes in the topology ,they do not need to interchange LSA/LSU )

Hello,

OSPF routers synchronize their LSDB every 30 minutes . right ?

To be precise, no, this statement is not correct. What OSPF routers do each 30 minutes is that each router takes all LSAs it has originated itself, increments their sequence (revision) number, resets the age and floods them. Basically, each router floods a refreshed version of its own LSAs. Note that this is not an entire database resynchronization.

At that moment , Is DBD packets exchanged first ?

No, it is not. The DBD is used only during ExStart and Exchange phases. Once you are past those, you never use DBDs again.

Best regards,

Peter

Peter Thank you very much .

Your explanation is brilliant .

However I need a step by step guide about what OSPF routers do each 30 minutes .

so is there any document which was mentioned about it on DocCD ?

I tried but I couldnt find out it . so please help me out .

Thank you .

Hello,

Hmmm... You won't find it explicitly written as "each 30 minutes, an OSPF router does this...". The 30 minutes is really a constant that could be different in various implementations. My recommendation is to start reading the RFC 2328 although it may take quite some time to digest to understand what's going on.

Alternatively, if you have access to some good libraries, try to look for these books:

John Moy: OSPF - Anatomy of an Internet Routing Protocol

Jeff Doyle: OSPF and IS-IS

Jeff Doyle et al.: Routing TCP/IP, Vol. 1

All these books focus on OSPF in great detail.

Best regards,

Peter

Hi peter . I have read a few documents .but still

I cant understand what happend every 30 minutes among each routers .

my understanding is

after the state was a full , incremental LSA would be sent with each change in topology .

so Routers LSDB would be synchronized at that moment .  They dont need to synchronize anymore .

and

you said.

To be precise, no, this statement is not correct. What OSPF routers do each 30 minutes is that each router takes all LSAs it has originated itself, increments their sequence (revision) number, resets the age and floods them. Basically, each router floods a refreshed version of its own LSAs. Note that this is not an entire database resynchronization.

From here ,Do you mean

Routers just flood their all LSAs every 30 minutes to reset the age ?

I couldnt understand  what precisely you said because of my lacking comprehension

Would you mind paraphrasing it ?

sorry for bothering you .

Regards.

Hello,

You are absolutely not bothering - don't worry. These forums are here to talk about things over and over until they can be understood.

I cant understand what happend every 30 minutes among each routers .

Okay, let's try to approach this from a different angle, and I will start in a very general way.

A key term in OSPF is the notion of a Link State Advertisement, or LSA. An LSA is used to carry information about elements of your network topology - routers and their connections to their neighboring objects including the network addresses, multiaccess networks, prefixes from other areas, external prefixes from outside of our OSPF domain. Information stored in these LSAs is used by each router to construct a "map", or a topological map (a directed graph, as mathematicians use to call it) of your network. This map is then used to search for the shortest paths.

LSAs are flooded to each router within a particular flooding scope - some LSAs may be flooded to routers in their own area only, other LSAs can be flooded even across areas, possibly to all routers within the OSPF domain. Each router generates one or more LSAs, depending on type and amount of the information it needs to tell to the other routers. Other routers will store these LSAs and flood them further but they may not modify them. Each router may modify only the LSAs it has originated, and if it modifies them, they need to be reflooded. However, a router is absolutely prohibited from modifying other routers' LSAs.

Because OSPF is an event-driven protocol, it would flood new information only when a topology change occured. If the topology did not change, OSPF would not flood any LSAs after the initial synchronization. This may seem like a straightforward way to implement OSPF but there is an important gotcha: what if the lack of new LSAs is caused by the fact that their originating router is dead?

Clearly, it is not a good idea to allow LSAs to stay in routers' link-state databases forever. For whatever reason, their originator may become unable to announce new LSAs, or it may become disconnected. However, LSAs it has originated would be lurking in link-state databases indefinitely.

That is why each and every LSA has an age timer associated with it. This timer is set to 0 when a router originates an LSA and floods it. Each other router then stores this foreign LSA in its link-state database and increments its age each second. If the age reaches 3600 seconds, or 1 hour, the router will flush this foreign LSA from its link-state database and recompute the routing table, bypassing the object that was described by the flushed LSA. In simple terms, each router must refresh its own LSAs before they reach the maximum age of 3600 seconds, otherwise other routers will flush them. A router can refresh a self-originated LSA by flooding it anew with the age timer set to 0 and the sequence number of the LSA being incremented. Do not confuse the LSA sequence numbers and their age. The sequence number of an LSA is just a revision number - it starts at a certain value and each new version (or better said, generation) of the same LSA carries an incremented sequence number. The sequence numbers are used to determine which LSA is more recent and more up-to-date when flooding updated LSAs. The age expresses the time since the LSA of this particular revision was last updated, and is used to limit the maximum time this LSA can stay in a link-state database.

So in short, before this 3600 second maximum age timer expires, a router must refresh its self-originated LSAs by flooding them anew, incrementing their sequence number by 1 and setting the age timer to 0. Obviously, it is too late to do it on or after the 3600 second period - by that time, other routers will have flushed the LSA already. In order to refresh LSAs smoothly, you need to refresh them well before the 3600 second period expires. OSPF takes a very conservative approach here and performs the refresh every 1800 seconds, or every 30 minutes.

This is the 30 minute interval which you are asking about. As the age of some self-originated LSA approaches 1800 seconds, the router will generate a refreshed version of the same LSA and flood it - an incremented sequence number, the age timer set to 0. That's it. Nothing more. There is no some kind of resynchronization of entire link-state databases or something. You just flood a new LSA, just like you would flood an LSA if some topological event occured. The DBD packets have nothing to do here. As with all LSA flooding operations, LSAs are flooded within LSU packets, and they are confirmed with LSAck packets.

You have also asked what will happen if the 1800 second period expires. Nothing will happen because the LSAs are going to be valid for another 1800 seconds (remember, their max age is 3600 seconds - that is an OSPF constant). You could refresh your LSAs every 300 or 3000 seconds if you wanted to. Even refreshing them every 3590 seconds would work but it diminishes your reserve for dealing with unexpected delays in processing the LSAs in a graceful way.

From here ,Do you mean

Routers just flood their all LSAs every 30 minutes to reset the age ?

Yes That is what I wanted to say, and you probably now know why I was saying that

Of course please feel welcome to ask further.

Best regards,

Peter

Hi peter .

I understand what happend every 30 minutes .thank you very much.

but I got another question .

When all LSUs of the router flood each 30 minutes, ( In multinetwork environment ,Destination is DR .right ? If so)

I think it become overloaded with DR .

Actually at that moment , How does DR deal with these LSUs ?

also

I'd like to make sure that

the router will generate a refreshed version of the same LSA and flood it - an incremented sequence number

in this sentence , Does sequence number mean LSDB sequence number ?

Yes That is what I wanted to say, and you probably now know why I was saying that

Of course please feel welcome to ask further.

Thank you very much again .

Hello,

When all LSUs of the router flood each 30 minutes, ( In multinetwork environment ,Destination is DR .right ? If so) I think it become overloaded with DR .

The load caused by processing the LSUs is negligible with today's processor performance. With regard to the DR, keep in mind that a single DR serves a single multiaccess segment. I sometimes see people think that there is a single DR for the whole area or for the whole network. Most certainly, this is not the case. Each multiaccess segment, such as Ethernet, has its own DR, and this DR is responsible only for that particular segment.

Now, on a multiaccess segment with N routers, each of these routers will need to refresh its self-originated LSAs every 30 minutes. However, this does not mean that all N routers will flood their LSAs at the same moment. Each of these routers may have been started in a different time and the 30-minute interval has been started at a different instant in time. So it is unlikely that the DR will need to process updates from all routers on the multiaccess segment in the same time.

And even if that happened - it is not that bad anyway. How many updates is the DR going to see for its own segment? Each router of these N routers is going to refresh its LSA-1, so we have N updates at this point. The DR will need to update the LSA-2 for the entire multiaccess segmet, so that is one update on top of the N updates. If any of these routers is an area border router or an autonomous system boundary router, it will need to refresh the inter-area, distant ASBRs and external network LSAs, resulting in possibly more updates being sent, but still, this is not serious.

Of course, we have focused on a single segment. Because any single change on a segment, including the LSA refresh, propagates throughout the whole area or the network, there will in fact be more updates than we have just described here. But let me assure you - the real life has shown us that while this may look as lots of work to do, it is not really significant in a stable, well-engineered network.

I'd like to make sure that

the router will generate a refreshed version of the same LSA and flood it - an incremented sequence number

in this sentence , Does sequence number mean LSDB sequence number ?

The sequence number here means LSA sequence number. The LSDB itself has no sequence numbers. LSAs have sequence numbers, e.g.:

R4#show ip ospf database

            OSPF Router with ID (10.255.255.4) (Process ID 1)

        Router Link States (Area 0)

Link ID         ADV Router      Age         Seq#       Checksum Link count

10.255.255.4    10.255.255.4    29          0x80000009 0x0045B7 1

        Summary Net Link States (Area 0)

Link ID         ADV Router      Age         Seq#       Checksum

10.0.12.0       10.255.255.4    29          0x80000007 0x008BC6

10.0.23.0       10.255.255.4    29          0x80000007 0x008FF7

10.0.34.0       10.255.255.4    29          0x80000007 0x009329

        Router Link States (Area 1)

Link ID         ADV Router      Age         Seq#       Checksum Link count

10.0.12.1       10.0.12.1       5           0x8000000A 0x001304 2

10.0.23.2       10.0.23.2       2025        0x8000000A 0x006295 4

10.0.34.3       10.0.34.3       2012        0x8000000A 0x003E88 4

10.255.255.4    10.255.255.4    29          0x8000000A 0x004B9F 2

The sequence number is the Seq# column.

Please keep the questions coming!

Best regards,

Peter

Very helpful. Thanks for taking the time to help us learning Peter.

Thank you for your reply.John.

then Can i say that DBD packets are inevitably exchanged before router exchange LSU ?

and  one question ,What is window lapses ?

Thank you .

Peter's welcome to elaborate on this, but since the dbd exchange happens during the exchange state, this exchange must happen before LSUs are exchanged. The reason is that the DBD describes the local database to the other neighbor. Without that, the other neighbor can't compare what links this peer has to its own database in order to make an intelligent decision on what LSA this peer could be missing. I may be repeating a little of what Peter said above, but once Router A transmits its dbd packet to Router B, Router B will look at it and say, "Oh, I don't have Router A's number 3; I need to request that." So Router B will send an LSR for number 3 from Router A. Router A will send an LSU to Router B containing the complete LSA (and not just the header that it sent in the dbd exchange).

The window lapse means that the 30 minute timeframe is up with no change. Once that occurs, the router that owns, or originated, an LSA refloods the LSA again regardless of change. The DBD doesn't happen again though because this flooding is done with an LSU packet.

Peter...help me out here if that's correct or not

HTH,
John

*** Please rate all useful posts ***

HTH, John *** Please rate all useful posts ***
Review Cisco Networking for a $25 gift card