OSPF Neighborship requirements [with configuration]

In order to Form OSPF Neighborship between two routers, some attributes need to match on both sides:

  • Match Area ID
  • Match Timers
  • Match Authentication
  • Match Subnet
  • Match MTU (stuck in Extart)
  • Match Area Type Flags (Example Stub)

I- Area ID

The first thing that OSPF check is the Area ID. It should match on both sides.

OSPF Area ID Configuration:

R1(config)#router ospf 1
R1(config-router)#network area 20

If OSPF Area is mismatched between the router’s interface, OSPF neighborship will not form and the following message will appear:

%OSPF-4-ERRRCV: Received invalid packet: mismatch area ID

II- OSPF Timers: OSPF Hello and Dead Interval

OSPF Hello timer (default is 10 Sec): defines how often OSPF Hello packets are sent to the neighbor.

OSPF Hello Interval (default is 40 Sec, 4×10): maximum time to wait for an OSPF neighbor to send a Hello packet before declaring it as down (dead)

OSPF Timers Configuration Example:

In order to reduce OSPF convergence time, we can reduce the OSPF timers with these commands:

  • To change the Hello Interval: ip ospf hello-interval
  • To change the Dead Interval: ip ospf dead-interval
R1#configure terminal 
Enter configuration commands, one per line.  End with CNTL/Z.
R1(config)#interface Serial0/1
R1(config-if)#ip ospf hello-interval 4
R1(config-if)#ip ospf dead-interval 16

III- OSPF Authentication

There are two methods of authentication that are defined for OSPFv2: plain text authentication and cryptographic authentication. This module describes how to configure cryptographic authentication using the Hashed Message Authentication Code.

IV- Match Subnet

In order to form OSPF neighborship, Routers Interface should be in the same subnet and Layer connectivity is up.

V- Match MTU

Links on routers have an MTU. The outgoing packets, including OSPF packets cannot have a bigger size than the interface MTU. Let’s have a look at the behavior of OSPF and packets.

VI- OSPF Area Type

Area type Can be OSPF standard Area, STUB, NSSA, etc.

The OSPF Area type should match to form OSPF neighborship.

Please refer to OSPF Area Types guide.

VII- OSPF Network type

Although this is not listed in the OSPF neighborship requirement, an incompatible network can’t form an OSPF neighborship.

There are several OSPF network types:

  • Broadcast
  • Non-Broadcast
  • Point-to-point
  • Point-to-multipoint

These OSPF network types can be classified into DR and non-DR types.

OSPF neighborship can’t be formed between DR and non-DR OSPF network types.



0 0 votes
Article Rating
Notify of
Inline Feedbacks
View all comments
Learn Duty
Would love your thoughts, please comment.x