OSPF Packets and Neighbor Discovery

Hi Rene,

I would like to know in which all scenarios router will get stuck in exrstate.

First authentication is enabled, later authentication is disabled on router, will this effect routers being enter to next state, i.e exchange state .

Regards,
Kishor

Just awesome!!!..Renne thanks a lot!!

Kishor,
I assume you mean the “ExStart” or “Exchange” state, so I will write about those. If OSPF is having an authentication problem, you will not see the routers stuck in ExStart or Exchange. In fact, you won’t see anything at all. The output for “show ip ospf neighbors” will just be blank (if a neighbor relationship hadn’t already formed). If a neighbor relationship already formed, and then an authentication problem is introduced, the neighbors will just drop once the dead interval is reached. The reason, in both cases, is because if there is an authentication mismatch, then the other router’s Hello message will simply be ignored. By ignoring Hello messages, the OSPF state machine will never even begin, let alone get to an ExStart phase.

To answer your other question, the most common reason by far for OSPF to be stuck in ExStart is because of an MTU mismatch between neighbors. Besides MTU mismatches, other possibilities include duplicate router IDs, access-list that block unicast packets, or NAT misconfigurations.

I recommend you check out a Cisco article that goes into great detail on OSPF getting stuck. You will find they have a very detailed 14 step explanation as to why an MTU mismatch causes this problem.

http://www.cisco.com/c/en/us/support/docs/ip/open-shortest-path-first-ospf/13684-12.html#exstart

1 Like

HI Rene,

Good explanatons.

Can you pls tell when and which stage adjacency get stuck during this process ?
If you have any video for building adjacency process and neighbour stuck scenarios , will be good.

Thnaks,
Rohitendu

Rohitendu,
Check out the link I posted in the comment above yours.

Hi Team,

Firstly awesome job coming up with such clear explanation.

I had a doubt and that is why we need Master and Slave , if we are to exchange the DBD packets anyway ?

Amit,
The purpose of establishing a master/slave relationship is to facilitate an orderly exchange between the two devices. At the most basic level, it decides who gets to talk first. Specifically, the device elected as the master does the following:

* Sends first DBD packet
* Increments the sequence numbers of the DBD
* Ensures that only one DBD packet is outstanding at once
* Retransmit a DBD if necessary. A slave cannot retransmit.

Hi Andrew,

From the above comment, it seems like only master sends the DBDs to slave or slave does sends DBDs to master?

what are the consequences if master/slave relationship is not formed before exchanging DBDs

Tappy,
If the slave has information that the master does not have, it must have a way of communicating this to the master, so slaves can transmit, but it is up to the master to set the rules on who can transmit first, and the master keeps the process orderly.

DBDs are exchanged only after the master/slave relationship is formed, so the situation you ask about is not possible.

Need to understand the “# show ip ospf database” command output.

database table which contains all the possible alternate routes to reach the destination with in the area.
neighbor has to exchange each and every possible route and store in a database table.

But my question is I am unable to map with all the possible routes learned via neighbors in
" show ip ospf database" command output . This command output shows the LSA types .can you please explain me who to map with the LSA types and with the possible route learned via neighbors to reach the destination.

Hi azzem,

Reading the OSPF topology table can be a bit a challenge for people who are new with OSPF.

You know that the OSPF topology table contains the LSDB which is the overview looking for the whole network. The same LSDB will be contained in every router participating in the OSPF process in the area. Based on that, each router will calculate the best route using the SPF algorithm to reach the destination network and it puts it in the routing table. If you aren’t familiar with how OSPF work, I advise you to read this lesson: Intro to OSPF

Now for reading the OSPF topology, this can be hard to be explained in details in this Forum, but Rene has made a lesson which he explained in details how to read the OSPF Topology table. You can find the lesson in here: Read OSPF database

Have a good weekend.

Below is my scenario with 2 Routers and each router configured with 3 loopback interface and two Fast Ethernet interfaces are up.
(Router A - loopback networks: 10.1.1.1/8, 11.1.1.1/8, 12.1.1.1/8 and Fast Ethernet 0/1 99.99.99.1/24 and Fast Ethernet 0/0 100.100.100.1/24).

 (100.100.100.1)	     (100.100.100.2)
    Router A  			Router B

        ----------Down staste----------
	----------init staste----------
	----------two-way staste-------
	----------extart staste--------

After master Slave negotiation, Router A considered as Slave and send below DBD packet with a summary of the LSDB which contain LSA-type 1 (Router-LSA)

Ethernet II, Src: c4:01:0a:84:00:00 (c4:01:0a:84:00:00), Dst: c4:02:03:f4:00:00 (c4:02:03:f4:00:00)
Internet Protocol Version 4, Src: 100.100.100.1, Dst: 100.100.100.2
Open Shortest Path First
    OSPF Header
    OSPF DB Description
        Interface MTU: 1500
        Options: 0x52 (O, (L) LLS Data block, (E) External Routing)
        DB Description: 0x02 ((M) More)
            .... 0... = (R) OOBResync: Not set
            .... .0.. = (I) Init: Not set
            .... ..1. = (M) More: Set
            .... ...0 = (MS) Master: No
        DD Sequence: 242
    LSA-type 1 (Router-LSA), len 72
        .000 0000 0011 0101 = LS Age (seconds): 53
        0... .... .... .... = Do Not Age Flag: 0
        Options: 0x22 ((DC) Demand Circuits, (E) External Routing)
        LS Type: Router-LSA (1)
        Link State ID: 12.1.1.1
        Advertising Router: 12.1.1.1
        Sequence Number: 0x80000001
        Checksum: 0x2157
        Length: 72
    OSPF LLS Data Block

In your explanation,
“In the exchange state, our routers are sending a DBD with a summary of the LSDB. This way the routers can find out what networks they don’t know about”.

My question:

  1. When Router B receives this DBD packet from Router A, how Router B understand that Router A connected networks ( 10.1.1.1/8, 11.1.1.1/8, 12.1.1.1/8,99.99.99.1/24,100.100.100.1/24) ? this network information is not shown in the LSA-type 1 (Router-LSA).Now How Router B will find out that what networks they don’t know about and what networks they know about?

2)Router A is sending Sequence Number: 0x80000001 and now what Sequence Number Router B will have to compare with Sequence Number received from Router A ?

1 Like

Hi Rene,

At Exstart state, when Master and slave is determined… what is the role of those master/slave routers ??
they will exchange the DBD anyway.

Thanks,
Gaurav

Hi,

" When our routers receive the DBD from the other side they will do a couple of things:

Send an acknowledgement using the LSAck packet"

LSack packets coming right after the DBD ?

Or after the LSR and LSU being sent ?

Thanks

Gaurav,
The Master is determined by which router has the highest Router ID (not necessarily the same router which has the highest OSPF priority). The master is responsible for the following:

  1. Sends first DBD packet
  2. Increments the sequence numbers of the DBD
  3. Ensures that only one DBD packet is outstanding at once
  4. Retransmit a DBD if necessary. A slave cannot retransmit.

So essentially, the purpose of the master/slave relationship is just a matter of ordering and housekeeping–assigning who is responsible for certain functions.

Hi,
Why R1 again sending an hello packet to multicast 224.0.0.5 (sequence no 3 )
and why there is LSUPDATE packet before LSREQUEST packet ( sequence no 4 in the shark file )
Thanks

Hello sims!

To answer your question “LSack packets coming right after the DBD ? Or after the LSR and LSU being sent ?”

A router receives the DBD first. Once that has been completed, and only then, does the router send an LSAck packet acknowledging the successful receipt of the DBD. An LSR is then sent ONLY if new or newer information is contained within the DBD that was received requesting more information.

In other words, an LSR essentially says to the other router “I don’t have information concerning network X that you sent me. Tell me more about it!” The other router will respond with an LSU stating: “OK, here is the additional information about network X you asked for!”.

So to summarize, the sequence of events is:

  1. Rx sends the DBD to Ry
  2. Ry receives the DBD successfully and responds with an LSAck saying “I acknowledge the DBD you sent me”
  3. If (and only if) new or newer information exists, Ry sends an LSR requesting more information about the networks in question
  4. Rx responds with an LSU which contains the required information…

I hope this has been helpful!

Laz

1 Like

19 posts were merged into an existing topic: OSPF Packets and Neighbor Discovery

Hello sim!

Concerning your question “Why R1 again sending an hello packet to multicast 224.0.0.5 (sequence no 3 )”

I assume you’re talking about the cloudshark capture that Rene posted on this thread on November 8 2015. Just for reference, the cloudshark output can be found here: https://www.cloudshark.org/captures/111cb2076caa

If you’ll notice, R1 has an IP address of 192.168.12.1. Sequence number 1 shows that R1 sent a hello packet, and sequence number 3 shows another hello packet from R1. Notice the time difference of 9.8 seconds. Remember that the default hello interval for OSPF is 10 seconds. So every 10 seconds, routers are expected to send out hellos. This is normal behaviour.

And about your question “and why there is LSUPDATE packet before LSREQUEST packet ( sequence no 4 in the shark file )”

Although it is true that an LSU is sent as a response to an LSR, it can also be sent under other circumstances. So an LSU is not always the response to an LSR. So the LSU that you see at sequence number 4 is not a response to the LSR that you see at sequence number 13. The LSUs that you see at sequence numbers 14 15 and 16 are the responses to the LSR.

I hope this has been helpful!

Laz

3 Likes