OSPF Packets and Neighbor Discovery


(Rene Molenaar) #1

This topic is to discuss the following lesson:


(Rene Molenaar) #2

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


(system) #3

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’


(ALFREDO V) #4

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


(Rene Molenaar) #5

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


(ALFREDO V) #6

Thanks


(alok d) #7

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

Thanks Rene


(Jacko B) #8

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


(Rene Molenaar) #9

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


(Alasdair M) #10

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.


(Rene Molenaar) #11

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


(Diego M) #12

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


(Rene Molenaar) #13

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


(kandhla c) #14

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


(Rene Molenaar) #15

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


(Oliver S) #16

I thought there was also a “attempt state”?


(Andrew P) #17

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


(Mansi B) #18

Hi,

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


(Andrew P) #19

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.


(Mansi B) #20

Hi Andrew,
Thanks for the answer.