OSPF Packets and Neighbor Discovery

This topic is to discuss the following lesson:

1 Like

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

Rene

Thanks

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

Thanks Rene

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 224.0.0.5). 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.

Jacko

Hi Jacko,

What OSPF network type did you use?

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

https://www.cloudshark.org/captures/111cb2076caa

Rene

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 192.168.12.2 on the fa-0/0 interface, but Donna has a 2.2.2.0 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?

 

Thanks.

Hi Alasdair,

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

OSPF: DR/BDR election on FastEthernet0/0 
OSPF: Elect BDR 2.2.2.2
OSPF: Elect DR 1.1.1.1
OSPF: Elect BDR 2.2.2.2
OSPF: Elect DR 1.1.1.1
       DR: 1.1.1.1 (Id)   BDR: 2.2.2.2 (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.

Rene

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.

Rene

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

Thanks
Kandhla

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
192.168.1.2       1   2WAY/DROTHER    00:00:34    192.168.1.2     GigabitEthernet0/1
192.168.1.3       1   FULL/BDR        00:00:32    192.168.1.3     GigabitEthernet0/1
192.168.1.4       1   FULL/DR         00:00:39    192.168.1.4     GigabitEthernet0/1

Rene

1 Like

I thought there was also a “attempt state”?

Oliver,
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

--Andrew

1 Like

Hi,

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

Mansi,
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.