cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
4986
Views
0
Helpful
7
Replies

ospf neighbor relationship query

nedk12345
Level 1
Level 1

Hello, how does ospf find out if neighbor is directly connected or not. Can ospf form neighbor with nondirect router for all network types say point-to-point.  OSPF uses mcast address 224.0.0.5 and 224.0.0.6 so it looks like ttl 1 is what causes directly connected check but what happens when it does not use mcast and uses ucast to form neighbor than where/how and which packet it checks for direct relationship. does all igp have the same behavior. thanks

7 Replies 7

Jon Marshall
Hall of Fame
Hall of Fame

nedk12345 wrote:

Hello, how does ospf find out if neighbor is directly connected or not. Can ospf form neighbor with nondirect router for all network types say point-to-point.  OSPF uses mcast address 224.0.0.5 and 224.0.0.6 so it looks like ttl 1 is what causes directly connected check but what happens when it does not use mcast and uses ucast to form neighbor than where/how and which packet it checks for direct relationship. does all igp have the same behavior. thanks


OSPF hello packets are sent with a TTL of 1 so they cannot be routed. So even unicast packets have a TTL of 1. The only exception to this are virtual links where you can establish an adjacency with router not directly connected.

Jon

Hello:

Just to add a bit to what Jon wrote, on Broadcast and point-to-point networks, Hello packets are multicast to the the AllSPFRouters address of 224.0.0.5.

On NBMA (like Frame Relay and ATM), point-to-multipoint, and virtual link network types, Hello packets are unicast to their individual neighbors. The implication of this, of course, is that the router already knows about an attached neighbor -- and that can require extra configuration commands, or a mechanism like Inverse ARP.

The old solution is to use the "neighbor" command to define the neighbor to the OSPF speaker. No dynamic discovery.

The newer solution is to change the OSPF network type on each interface to Broadcast, in which case the Hellos will be multicast to the 224.0.0.5 address, as described above.

In addition, for the most typical NBMA network -- Frame Relay -- the frame-relay map command will be used with the "Broadcast" keyword at the end of it to inform the router how to reach the other routers on the NBMA network by mapping an IP address to a DLCI.

By the way, on an NBMA network, Hello packets are sent every Poll Interval, which is 120 seconds by default on Cisco routers.

HTH

Victor

I don't see TTL field in hello. Is it in IP Header. How does it know that the packet is a hello packet and it needs to be ent with ttl1. How is OSPF encapsulated in IP. Does that mean OSPF is at layer 4 (transport layer) protocol as all routing protocol sit at layer 3.

All documents say ospf hello interval is 30 seconds on nbma. is poll interval different from hello interval. Thanx

nedk12345 wrote:

I don't see TTL field in hello. Is it in IP Header. How does it know that the packet is a hello packet and it needs to be ent with ttl1. How is OSPF encapsulated in IP. Does that mean OSPF is at layer 4 (transport layer) protocol as all routing protocol sit at layer 3.

All documents say ospf hello interval is 30 seconds on nbma. is poll interval different from hello interval. Thanx

Yes the TTL is in the IP header. OSPF has a protocol number at the IP layer (89) and is encapsulated directly into an IP header. So it is not at layer 4 ie. TCP/UDP,  it is at L3.  Bear in mind that the IP model does not map properly to the OSI model so it can be a bit fuzzy when we talk about layer 3/layer 4 etc.

How does it know it is a hello packet, not sure what you mean. The OSPF code will know what type of packet is being sent.

Edit - missed last question. Poll interval is not the same as hello interval. Polls are used when a neighbor is down and it is polled to check it's status.

Jon

OSPF packets are directly encapsulated by IP. It is the IP header that has the TTL field that is set to 1 when a multicast Hello packet is sent. OSPF is IP protocol number 89.

All routing protocols do not reside in layer 3. RIP rides on top of UDP (port number 520) and BGP rides on top of TCP (port number 179).

The Poll Interval is separate from the Hello timer.

HTH

Victor

Jon sorry for the cross post.

I was about to answer his post - had the form open, but then went to eat dinner before my girlfriend hit me with a soup ladle. I came back and posted, not knowing you already answered.

Thanks

Victor

Hello Ned,

OSPF is a routing protocol that works at OSI layer3 but if we look at an OSPF packet we see that OSPF has its own protocol number over IP (89).

Let's not confuse where a protocol works with how a protocol is encapsulated.

BGP uses TCP port 179 on one side so it is above transport level, but its activity is to route IP traffic so it works at level3.

Hope to help

Giuseppe

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: