In the last two sections, Hello packet and DBD packet we learned that R1 and R2 discovered each other via Hello packet and then they sent their DBD packets to each other.

In the ExStart state, they choose which one of them is Master or Salve, then in the Exchange state, they sync their LSA headers via sending DBD packets.

If the routers recognized that their neighbors have an LSA that they don't have in their own database, they send a Link State Request asking for complete information of the LSA.

But what is the exact payload inside of this type of packet that OSPF carries on?

Inside of the LSR packet, we have:

We know about type of LSAs:

But what is link-state ID? This is the Router-ID of the originating router. This value will be changed based on LSA types. Link ID in LSA-type1 is Router-ID and in LSA-type 2, is the IP address of Designated Router (DR).

Let’s go and check the LSR packet that sends from R1 to R2 via debugging command on the router and Wireshark.

Step 1: run these two debugs in R1

Debug IP OSPF packet

Debug IP OSPF adjacency

Responsive image

Step 2: then clear the OSPF process with command

#Clear IP OSPF process

Responsive image

Look at the process that sends by R1 to R2:

Responsive image

R1 and R2 send their DBD packets to each other, after they choose the Master in the ExStart state, then they exchange their LSA headers to synchronize their link-state database.

R1 looks at its own database and if missed some of the LSA that saw in the DBD packets from R2, it sends LS Request for full of the entire in the LSAs, not the header of LSAs because it received LSA header in DBD packets from R2.

Look at the Wireshark capture.

Responsive image

In packet number 19, R1 received DBD packets with a length of 118 from R2.

You can see that the LSA Type 1 and LSA Type 2 exist inside of the packet.

Responsive image

If you open the LSA-type 1, you can see it is just the header. It isn't all of the information, and because the type of the LSA is Router LSA, the link-state ID is Router-ID.

Responsive image

But in LSA-type 2, link-state ID is the IP address of Designated Router (DR)

Responsive image

If you use command #show IP OSPF database router in R1, you can see all of this information.

Age, Options, LS Type, Link State ID, Advertising Router, Sequence Number, Checksum, and Length.

Responsive image

After R1 received the DBD packet, it sends another packet to R2 with the sequence number of R2.

Responsive image

Then R2 sends another DBD packet that increment the sequence number.

Responsive image

In this section, R1 sends the Link-State Request packet to R2 and asking for the full of information of LSAs advertised by R2 in the DBD packet. We don’t send requests per LSA, but you can send multiple requests in just one packet.

Responsive image

In the next packet, R2 responds to this request with Link-State Update.