cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1335
Views
4
Helpful
11
Replies

OSPF neighbor process

tuanjggaa
Level 1
Level 1

Hello experts. 
As i know when OSPF go " neighbor " with others they must have the same subnetmask.

But let's consider my diagram.

R1---R2
R1 int ip add 192.168.1.1/24

R2 int ip add 192.168.2.1/24
they have the same subnetmask is /24. Why can't they go neighbor? 

11 Replies 11

Joseph W. Doherty
Hall of Fame
Hall of Fame
OSPF neighbors have multiple attributes, beyond the interface network, they must agree on. For example, area type.

I know, but let's Area ID and others the same. Just consider about the IP add and subnet above. 
They must have the same subnet, but why they can't go neighbor. If there're any field that define the Ip add then what is it and what packet type are they in ?

rasmus.elmholt
Level 7
Level 7

Hi
OSPF also need to agree on timer, MTU and area number/type.
The subnets are different, and when the initial hello is sendt, the rest of the packets are unicasted(DBD,LSR,LSU,LSAck), exept for triggered LSU packets

In my test setup one router is 192.168.22.1/30 and the other is 192.168.22.129/25:
Aug 25 18:49:39.591: OSPF-1 HELLO Po2: Send hello to 224.0.0.5 area 0 from 192.168.22.129
Aug 25 18:49:42.233: OSPF-1 ADJ Po2: Rcv pkt from 192.168.22.2, area 0.0.0.0 : src not on

let's consider the rest is the same. Just consider ip add and subnetmask. I read in RFC that they must have the same subnetmask ! So there you go /24 subnetmask. Why can't they go neighbor ?
If there's any field that define Ip add then what is it?  And that packet type are they in ?

There is no OSPF header defining the IP address of the router(only RIDs etc.) But the OSPF packets are within a normal IP packet, and the IP address is of caused validated. The next step in the OSPF process requires unicast communication between the hosts.

So this is not an OSPF "thing" but an implementation "thing". It doesn't make any sence not to validate the source IP address.
Take a look at this OSPF_broadcast_adjacency PCAP file: http://packetlife.net/captures/protocol/ospf/

Thanks for replying !
So first R1 : it'll send the Hello packet to 224.0.0.5 and R2 which is running OSPF will catch it right !
Then R2 send unicast back to R1 but R1 never receive because they're in different subnet right ?
Or Then R2 can't send unicast back to R1 because they're in different subnet ? 

Hello

 


@tuanjggaa wrote:

Hello experts. 
As i know when OSPF go " neighbor " with others they must have the same subnetmask.

But let's consider my diagram.

R1---R2
R1 int ip add 192.168.1.1/24

R2 int ip add 192.168.2.1/24
they have the same subnetmask is /24. Why can't they go neighbor? 


They may have the same subnet mask but are not in the same network range so they wont make an adjecency.

 

res

Paul

 

 

 

 

 

 

 


Please rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.

Kind Regards
Paul

Thanks !

Julio E. Moisa
VIP Alumni
VIP Alumni

Hi

In OSPF must match some terms, like MTU, Timers and the network under the interface Point to Point. In your case you have 2 different networks on each interface: 192.168.1.1 and 192.168.2.1 unless your network is a /22  (but you will waste many ip addresses)  it can work otherwise it will never make a neighborship.

Just for testing you can change the subnet mask under each interface to 255.255.252.0 and it will come up. 

The best recommended subnet masks for a Point to Point are:

/31  255.255.255.254  (verify if your device supports it)

/30  255.255.255.252

 

 

:-)

 




>> Marcar como útil o contestado, si la respuesta resolvió la duda, esto ayuda a futuras consultas de otros miembros de la comunidad. <<

Thanks sir !

You are welcome, have a great day.

:-)




>> Marcar como útil o contestado, si la respuesta resolvió la duda, esto ayuda a futuras consultas de otros miembros de la comunidad. <<