OSPF Packets and Neighbor Discovery

This topic is to discuss the following lesson:

I like your creations as you have simply explained. Your images are self-explanatory and really appreciated. thank you very much!

Hello Mr.Rene,

You tells, at two-way State “hello response will send using unicast and include all ospf neighbors address”

so what the different about DBD and “all ospf neighbors address on hello response”

many regards’

Maybe is not part of this lesson but I learn when I took my CCNP class that when SPF has too many calculations means there is a problem and I would like to know your opinion on this.
I checked a layer 3 Nexus switch and I run the command #sh ip ospf and I noticed that SPF calculation has run 589085 times, the switch is been up for more than 2 years. Please advise

Hi Alfredo,

It doesn’t have to be a problem. Basically, every time an interface goes up or down it triggers a SPF calculation. If you have a large network, it’s possible that you’ll see many calculations.

NX-OS also uses a partial SPF for some LSA types so I wouldn’t worry about it too much. If you are interested, you can probably debug what is triggering the SPF calculation(s).



This is way better explained and made simpler to understand, popular books out there has failed to do so.

Thanks Rene


I did a test with two routers in GNS3 to see what kind of packets are exchanged between the two routers. I noticed that first there is an exchange of Hello Packets (to destination address You are mentioning that there is a unicast response Hello packet. The only unicast messages I could find are the DBD and the LS packets.


Hi Jacko,

What OSPF network type did you use?

Here’s an example for broadcast, you can see the unicast hello packets:



im missing something about how the router IDs are derived in this example.

What I see is that in the Exstart state the example says Donna has the highest router ID, which makes sense if it’s on the fa-0/0 interface, but Donna has a network attached to a loop back interface, so I’m missing the reason that Donna’s RID isn’t out of that network.

Can you tell me what I’m missing?



Hi Alasdair,

Donna should use as its router ID, you can also see it in the DR/BDR election:

OSPF: DR/BDR election on FastEthernet0/0 
OSPF: Elect DR
OSPF: Elect DR
       DR: (Id)   BDR: (Id)

OSPF prefers loopback interfaces over physical interfaces. It is non-preemptive though, so if it has elected a router ID then it will use it until you reset the OSPF process.


Hi Rene,

Please, can you confirm that this secuence is correct ?

R1 R2

1º down-------------------------down

2º down------Hello ----------->init

3º two-way <----Hello R1-----init

4 º two-way ----Hello R2 ---->two-way

Thanks to you

Hi Diego,

That looks right. If you want to see it in action, enable “debug ip ospf adj” on both routers and then compare the output. With the timestamps, you can exactly see when the routers switch states.


Hi Rene

Can you help me answer this question.

On a broadcast link, what state normally exists between two DROTHERS ?
I am not sure what it meant by “normally”. Should that be full (sync is complete) ?


Hi Kandhla,

On multi-access interfaces OSPF will only establish a full adjacency with the DR and BDR router. DROTHERs will remain in the two-way state. Here’s an example of a router with three other OSPF neighbors:

R1#show ip ospf neighbor 

Neighbor ID     Pri   State           Dead Time   Address         Interface       1   2WAY/DROTHER    00:00:34     GigabitEthernet0/1       1   FULL/BDR        00:00:32     GigabitEthernet0/1       1   FULL/DR         00:00:39     GigabitEthernet0/1


1 Like

I thought there was also a “attempt state”?

You are correct. There is an Attempt state, and you would only see it under the following conditions:

    Your router is an NMBA environment
    You have manually configured a neighbor
    The router has sent a unicast Hello to a neighbor
    The dead timer for that neighbor has not yet expired


1 Like


Why does a Router send a Data Base Descriptor first to a neighbor and not the entire LSDB ?

Because OSPF was written a long, long time ago, when every bit saved in bandwidth really mattered. By using DBDs to figure out what was missing between neighbors, there was the potential for a lot fewer bits being transmitted as opposed to sending the entire LSDB.

1 Like

Hi Andrew,
Thanks for the answer.