OSPF Packets and Neighbor Discovery

Thanks for that, Laz. I’m finding while studying for the CCNP that I often don’t know exactly how deep to research certain topics. Some topics don’t seem to go much deeper than the CCNA level but others obviously do. I’ve been using a combination of the OCG and this site mostly but sometimes your lessons go far deeper than the OCG. I usually find myself going down a rabbit hole for whatever topic I’m currently studying and I have to force myself to move on and accept that I probably don’t need to learn every detail right now.

Hello Aaron

The question of how deep to go is indeed difficult to answer. It has to be a balance between requirements, curiosity, and time. Cisco’s exam topics blueprint are not always crystal clear as to the actual covered content, and by no means do they indicate how deep you should go in a topic. In addition to this, Cisco always states the following alongside their exam topics:

The following topics are general guidelines for the content likely to be included on the exam. However, other related topics may also appear on any specific delivery of the exam. To better reflect the contents of the exam and for clarity purposes, the guidelines below may change at any time without notice.

So there is no way to know how far to go. When you start going through a rabbit hole, you’ll just have to stop yourself, and ensure you understand the fundamentals well. In other cases, you may have to push yourself to cover all of the required subject matter in a particular area.

Ultimately, if you have done the labs, and you have gone over the material and have a good understanding of the topics and technologies, you should be OK.

I hope this has been helpful!

Laz

Liz sir,
I didn’t understand truly the function of master and slave in OSPF packet, would you please explain it to me in briefly?

Thanks and Regards.

Ajmal" Ahmadi"

Hello Ajmal

Take a look at this post:

I hope this has been helpful!

Laz

1 Like

Thanks sir, now I see

Regards

Ajmal

1 Like

Why do we have a MTU check in the DBD packet in OSPF ? In case of lower MTU IP can fragement it and receiver can do reassembly, why deos OSPF have to bother about MTU ?

Hello Adhiraj

Appendix A.1 of the RFC 2328, which defines OSPFv2 clearly states the reason like so:

OSPF does not define a way to fragment its protocol packets, and
depends on IP fragmentation when transmitting packets larger than
the network MTU. If necessary, the length of OSPF packets can be up
to 65,535 bytes (including the IP header).  The OSPF packet types
that are likely to be large (Database Description Packets, Link
State Request, Link State Update, and Link State Acknowledgment
packets) can usually be split into several separate protocol
packets, without loss of functionality.  This is recommended; IP
fragmentation should be avoided whenever possible.  Using this
reasoning, an attempt should be made to limit the sizes of OSPF
packets sent over virtual links to 576 bytes unless Path MTU
Discovery is being performed.

So it seems that OSPF prefers to “know” the MTU value, and then to separate the data of larger packets into separate protocol packets rather than rely on the fragmentation mechanisms provided by the IP protocol. As it states, fragmentation should be avoided whenever possible.

Additionally, according to section 10.6 of the RFC, it states:

    If the Interface MTU field in the Database Description packet
    indicates an IP datagram size that is larger than the router can
    accept on the receiving interface without fragmentation, the
    Database Description packet is rejected.

I hope this has been helpful!

Laz

Why is it said in the RFC that :IP fragmentation should be avoided ? OSPF protocol takes IP services for fragmentation, what are the issues envisioned if IP fragments the OSPF control packets ?

Hello Adhiraj

From my understanding, it’s simply a design decision. Engineers decided that it would be better for large packets such as database description packets and LSRs, not to be fragmented using the fragmentation mechanism of the IP protocol. It is preferable (again by design) to split those packets into multiple distinct OSPF messages.

So the “fragmentation” is actually being done by the OSPF protocol before it prepares the OSPF messages to send as opposed to having an OSPF message larger than the MTU that will be fragmented upon encapsulation from the Network to the Data Link layer.

And of course, in order to do this, OSPF must know the MTU, which is why the MTU check is maintained as part of the OSPF database description packet.

Could OSPF have been designed to use the fragmentation process of IP? Probably. What is the reason for not doing this? Protocols such as OSPF have been designed with rigorous testing over the years, and this method must have been found to be the most efficient and stable method of transmission.

I hope this has been helpful!

Laz

1 Like

Hi Guys

I have some problem understanding this phrase

Init: A neighbor is placed into the Init state if a valid Hello packet has been received from it but the list of seen routers in this Hello packet does not contain the receiving router’s RID. This means that this router can hear the other router but it is not certain whether the other router can hear this router.

what does it mean seen routers in a hello packet and does not contain receiving router’s RID ?

Hi @lagapidis

Does it mean aside from an lsack, it can also send out an lsu ?
Both contain same information in the packet ?

Hello Virgilio

According to the RFC, any type of packet that is received by an OSPF router must be responded to to ensure because OSPF is a reliable protocol. This is the case for any type of OSPF packet sent including LSUs and DBDs. Normally, this acknowledgement takes the form of an LSAck packet, acknowledging the specific packet sent. The LSAck packet contains within it the ID of the advertising router, the LSA type and the sequence number of the LSA that is being acknowledged.

However, OSPF is also a protocol that attempts to reduce the unnecessary exchange of information. If R1 receives an LSA or DBD from R2 but is also preparing to send its own LSA to R2, it doesn’t send both an LSA and an LSAck. It will only send the LSA. R2 will interpret this LSA as a response to its own LSA.

No, the information within an LSAck and an LSA are very different. The LSAck contains only enough information to act as an acknowledgement to sent information the LSA contains complete information about prefixes, metrics, network types etc,…

I hope this has been helpful!

Laz

1 Like

OSPF hello packet is showing as 97 bytes. Please confirm, is it 48 bytes or 97 bytes.

Hello Vijay

In the lesson, and specifically, in the debug output the OSPF hello packet is 48 bytes. This 48 byte is measured as follows: OSPF Header (24 bytes) + OSPF hello packet (24 bytes) = 48 bytes. If however, you look at a Wireshark capture of an OSPF packet, like the one found here, you will find that the length of the hello packet may be 90 or 94 bytes or even another value. This is because wireshark includes IP headers, Ethernet headers, as well as any additional OSPF LLS data blocks… It all has to do with how Wireshark and the Cisco debug mechanism define the “hello packet” and its length.

I hope this has been helpful!

Laz

Thank you very much, this helps.

Regards,
Vijay

1 Like

In broadcast network , one router will send the hello as multicast but other router will send the hello as unicast …Right ??

First master sends the DBD packet and then Slaves sends the DBD packet as Ack or it will send an Ack and then DBD ?..Where is the empty DBD packet ,who sends it ?.

In DR& BDR scenario, Is it true that the DR will always be the master or the slave ??, if drother becomes a slave then which multicast address it will use to send the dbd packet ?

Lets say, There is a interface went down , it means all the router within an area do the Full SPF calculation and all router in other area do the partial SPF calculation.Right ??,.

Lets say i shut the interface of a router and which message the router will sent to neighbors for informing them that the link went down ?.. that message would be unicast or multicast ?.

In every 30min , how the routers will refresh their LSDB, Does router sends LSU to multicast address or someone will send the LSR and router will reply with the LSU for refreshing the LSA age timer ?

Each and every OSPF packet except hello gets acknowledge with LSAack or what ?

How OSPF routers acknowledges the each LSu , is it help of Sequence number ?, Does ospf router acknowledges each and every LSU separately based on the sequence number ?

Kindly explain little more about the , How the routers sync the LSDB to to avoid the max age timeout , which messages the routers sent with each other or they all start sent LSU to the multicast address ?..How it happens in DR & BDR scenario??.

is it possible that the LSDB max age timer can be different of every router ??, Lets say 1 router has 600sec to reach max age and other router has 1200sec ??

Hello Narad

The initial hello to create the adjacency is sent using multicast. This is because the router doesn’t know if there are any neighbors, and if so, what their IP addresses are. Once a neighbor recieves a multicast hello, it will respond using unicast since it knows the IP address of the initial sender. From there on, all hellos in both directions are unicast.

The RFC 2328 states that the DBD packets are explicitly acknowledged. However, OSPF can often combine packets, so you may get a a single DBD packet that contains an ACK to a previously received DBD as well as DBD info.

No, the DR/BDR election and the master/slave election are two independent processes. However, if both depend upon the router ID, then yes, the DR will be the master. However, you can modify this behavior using the priority parameter, thus making a different router be chosen as the DR. I’ve labbed it up and confirmed this.

For questions about topology change, when interfaces go down, the OSPF router will inform neighbors of prefixes that it can no longer reach via that interface. So it sends out newer LSAs indicating these changes.

For many other questions, the RFC has a detailed description of how the protocol works, and you should find your answers in there. Some additiona lessons that may help include:

I hope this has been helpful!

Laz

1 Like

Hi all,
I have an OSPF adjacency problem.
I have configured two routers, both connected via interface Ethernet0 /0 .
On the first router I configured the IP 192.168.1.2 255.255.255.254 on the interface Ethernet0 /0.
On the second router I configured on the interface Ethernet0 /0 , the IP 192.168.1.3 255.255.255.254 and a Loopback2 8.8.8.8 255.255.255.255.
The ping between the two routers works.
I am attaching the routing table of both routers,
R1:

Gateway of last resort is not set

       192.168.1.0/24 is variably subnetted, 2 subnets, 2 masks
C 192.168.1.2/31 is directly connected, Ethernet0 / 0
L 192.168.1.2/32 is directly connected, Ethernet0 / 0

Gateway of last resort is not set

       8.0.0.0/32 is subnetted, 1 subnets
C 8.8.8.8 is directly connected, Loopback2
       192.168.1.0/24 is variably subnetted, 2 subnets, 2 masks
C 192.168.1.2/31 is directly connected, Ethernet0 / 0
L 192.168.1.3/32 is directly connected, Ethernet0 / 0

R1#sh run | s ospf
router ospf 10
 router-id 1.1.1.1
 redistribute connected subnets
R1#

R2#sh run | s ospf
router ospf 20
 router-id 2.2.2.2
 redistribute connected subnets

Why is adjacency not formed if I entered the command redistribute connected subnets?

Thanks

Hello Alessandro

You’ve configured the interfaces correctly, using a /31 subnet mask. However, when you configured OSPF, you didn’t advertise that network. You must use the network command under the OSPF configuration to indicate which subnets will participate in OSPF and thus which interfaces will begin sending OSPF hello packets to establish adjacencies.

In your case, you must add the network 192.168.1.2 0.0.0.1 area 0 command under the OSPF configuration mode for both routers.

Take a look at this lesson for more details:

I hope this has been helpful!

Laz

Hi lagapides, thank u for reply.
I know that if i add network 192.168.1.2 0.0.0.1 area 0 command under the OSPF configuration, it’ work but, my question is why not work if i add the command redistribute connected under the OSPF configuration.
Both router have the network 192.168.1.2/31 connected, and the command redistribute connected, should advertise this network or not?

Thanks.

| lagapides Lazaros Agapides
October 14 |

  • | - |

Hello Alessandro

You’ve configured the interfaces correctly, using a /31 subnet mask. However, when you configured OSPF, you didn’t advertise that network. You must use the network command under the OSPF configuration to indicate which subnets will participate in OSPF and thus which interfaces will begin sending OSPF hello packets to establish adjacencies.

In your case, you must add the network 192.168.1.2 0.0.0.1 area 0 command under the OSPF configuration mode for both routers.

Take a look at this lesson for more details:

NetworkLessons.com – 18 Feb 13

### Basic OSPF Configuration

In this article i’ll walk you through the configuration of OSPF on CCNA level.

Est. reading time: 14 minutes

I hope this has been helpful!

Laz