Why OSPF needed Physically or Virtually Adjacent router to build neighborship?

The aforesaid question is one of my favorite interview questions. I usually ask this question to interviewees who are in mid-level that is L2 or L2+ or L3, that if R1 is connected with R2 and R2 is connected with R3, is it possible for R1 to build a neighborship with R3 without introducing any virtual adjacency like GRE/Virtual link, etc.

Well, few answers me correctly that no it is not possible and few answers me wrong it is possible. Those answers me correctly my next question to them is, why it cannot build neighborship……… whooaaaaaaaaa here you go, most of the answers it is OSPF feature/nature or properties, I reply them that they are correct but why it is an OSPF property but very rare cases I got the answer………..The answer is the TTL value of the hello packet is set to 1 by design of OSPF which restricts it to build neighborship with a device that is more than a Hop away. Let us check and prove the same.

Let us take the example of Broadcast multi-access network below:

OSPF BMA

Now, I started to Capture between R1 to SW1 and applied filter “ip.dst == 224.0.0.5” so that I can only filter the OSPF packets. Since it is a Broadcast network I could have applied filter for the entire multicast segment but here in our case, it is not relevant.

Hello Packet screenshot 1

So, now let us open a Hello Packet, the hello which played the most critical role in the neighborship.

Hello Packet screenshot 2.png

We will now open the Internet Protocol Version 4 section of the packet, let see what we get in that.

Hello Packet screenshot 3

Here we go, the TTL value is 1……hence proved but you can still say that it is the hello packet captured when we have the visibility of the adjacent router, so let us take a hello packet which is captured way before the adjacent router is configured with OSPF.

Hello Packet screenshot 4

This is the first Hello packet that the router generated in my GNS3 Lab.

So, we got our answer………..We can still run the same test on P2P but that I left for your exercise.

Okay, here is not the end, think of the different angles of the story. OSPF does not build a neighborship directly. The OSPF participating routers send a hello to a multicast IP to build the neighborship and then the unicast come in place. Now, if you separate the two routers by a different router then your broadcast domain will be segregated, which will, in turn, segregate your multicast domain as well unless you do any specific configuration.

Hope I have answered you guys…….Let me know your feedback.

I hope this helps you guys if you like it then do not forget to hit the like button and share it with your friends and family.

All the best guys.

Cheers,
Maddy

Architect/Consultant in IT/Telecom/Networking Support Industry with over 13+ years of Experience. Mainly working with Cisco Products other than Cisco worked with VMware NSX/Juniper/Riverbed/Meraki & Citrix Products, and worked with various clients like PSU Banks, Petroleum Corporations, different government sector clients, BPO Sector, Telecom NOC and ISP. Global Certifications: VMware vSphere Foundation 6 CCNA Routing & Switching CCNP Routing & Switching ITIL V3 Foundation RTSA-W RTSS-W RSA RTSA-NPM RTSS-NPM Aspiring Certifications: VCP-NV

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.