Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. And see here for current known issues.

New Member

OSPF Neighbor v OSPF Adjacency

I'm trying to define the difference between an OSPF neighbor and an OSPF adjacency. I'm wanting to see how you guys would explain this.  I'm under the impression that OSPF neighbors are routers that are in the same area and that is running OSPF.  An OSPF adjacency is formed when OSPF neighbors exchange routing updates.

My example of this is an environment of 3 OSPF routers.  There would be one DR, one BDR, and one DROTHER router.  The DR would form an adjacency with the BDR and the DROTHER since the DBR and DROTHER would be getting routing updates from the DR.  Since the BDR and the DROTHER don't exchange routing updates, they would be neighbors but they would not form an adjacency.

Do I have this concept right?

Thanks,

Dan

1 ACCEPTED SOLUTION

Accepted Solutions
Cisco Employee

Re: OSPF Neighbor v OSPF Adjacency

Hello Dan,

In short, two OSPF routers are neighbors if they are connected to the same subnet and share a series of common configuration information:

  • Same Area ID
  • Same Area type
  • Same subnet mask
  • Same timers
  • Same authentication
  • They see their own OSPF RID in each other's Hello packet

In essence, OSPF neighborhood is a relation of two routers that allows them to see and understand each other but nothing more. In particular, two OSPF neighbors do not exchange any routing information - the only packets they exchange is Hello packets.

OSPF adjacency is formed betwen selected neighbors and allows them to exchange routing information. So, two routers must first be neighbors, only then they can become adjacent. Two routers become adjacent if:

  • At least one of them is DR or BDR (on multiaccess type networks), or
  • They are interconnected by a point-to-point or point-to-multipoint network type

So, to sum it up, OSPF neighbors are simply routers that sit on the same segment and hear each other, but they do not engage in any closer cooperation. OSPF adjacent routers exchange routing information.

Best regards,

Peter

9 REPLIES
Cisco Employee

Re: OSPF Neighbor v OSPF Adjacency

Hello Dan,

In short, two OSPF routers are neighbors if they are connected to the same subnet and share a series of common configuration information:

  • Same Area ID
  • Same Area type
  • Same subnet mask
  • Same timers
  • Same authentication
  • They see their own OSPF RID in each other's Hello packet

In essence, OSPF neighborhood is a relation of two routers that allows them to see and understand each other but nothing more. In particular, two OSPF neighbors do not exchange any routing information - the only packets they exchange is Hello packets.

OSPF adjacency is formed betwen selected neighbors and allows them to exchange routing information. So, two routers must first be neighbors, only then they can become adjacent. Two routers become adjacent if:

  • At least one of them is DR or BDR (on multiaccess type networks), or
  • They are interconnected by a point-to-point or point-to-multipoint network type

So, to sum it up, OSPF neighbors are simply routers that sit on the same segment and hear each other, but they do not engage in any closer cooperation. OSPF adjacent routers exchange routing information.

Best regards,

Peter

Bronze

Re: OSPF Neighbor v OSPF Adjacency

I would agree with you. That is how they compare.

Silver

Re: OSPF Neighbor v OSPF Adjacency

Hello Dan,

Yes,  Two routers will not become neighbors unless they agree on the       following (besides the fact the need to be on same subnet and unique RID) :

Area-id

Authentication

Hello and Dead Intervals

[Stub area] flag

This was the first step. Then the next step is the adjacency establishment for the following reason =>

=================================================

In order to minimize the amount of information       exchange on a particular segment, OSPF elects one router to be a designated       router (DR), and one router to be a backup designated router (BDR), on each       multi-access segment.


The idea behind this is that routers have a central point of contact       for information exchange. Instead of each router exchanging updates with every       other router on the segment, every router exchanges information with the DR and       BDR. The DR and BDR relay the information to everybody else. In mathematical       terms, this cuts the information exchange from O(n*n) to O(n) where n is the       number of routers on a multi-access segment. The following router model       illustrates the DR and BDR:

=================================================

In order to distinguish what kind of relation (neighbor or adjacency) you can see 'sh ip ospf neighbor'

============================

R7# show ip ospf neighbor

Neighbor ID     Pri       State           Dead Time   Address         Interface
170.170.3.4       1       2WAY/DROTHER    00:00:34    170.170.3.4     Ethernet0
170.170.3.3       1       2WAY/DROTHER    00:00:34    170.170.3.3     Ethernet0
170.170.3.8       1       FULL/DR         00:00:32    170.170.3.8     Ethernet0
170.170.3.2       1       FULL/BDR        00:00:39    170.170.3.2     Ethernet0

============================

State : FULL/DR or FULL/BDR means the adjacency is FULL with the DR and BDR (Note an adjacency is established by all routers of the multiaccess segement/NBMA with DR and BDR).

For those which are 2WAY/DROTHER means a neighbor relationship.

Here also some references about this subject =>

The concepts of neighbor/adjacency are explain here :

http://www.cisco.com/en/US/tech/tk365/technologies_white_paper09186a0080094e9e.shtml#t18

This link also explain well the concept of Neighbor with 2WAY state  :

http://www.cisco.com/en/US/tech/tk365/technologies_tech_note09186a0080094059.shtml

Buidling an adjacency steps :

http://www.cisco.com/en/US/tech/tk365/technologies_white_paper09186a0080094e9e.shtml#t22

Hope that help

Cheers

karim

New Member

Re: OSPF Neighbor v OSPF Adjacency

That makes sense.  I'm playing here in packet tracer and I created the following topology:
(Sorry for the bad drawings)

I'm not getting a DR and BDR elected in this topology.  Since I'm not getting a DR election, does that mean none of these routers are adjacent or does it mean they're all adjacent?  They are showing up in the neighbor table, fyi.

I also created this topology:

With this configuration, I get a DR, BDR, DROTHER in the ospf neighbor table.

New Member

Re: OSPF Neighbor v OSPF Adjacency

krahmani323,

In this document

Buidling an adjacency steps :

http://www.cisco.com/en/US/tech/tk365/technologies_white_paper09186a0080094e9e.shtml#t22

There's a key phrase in the adjacency section that tied it all together: "multi-access segment".  By definition, OSPF neighbors on point-to-point links are also adjacent, because updates are only going to come from one of the two routers on the link.  In multi-point segments you have the potential for many routers sending updates.  To keep the topolgy consistant a DR and BDR is elected.  Adjacencies are formed to the DR and to the BDR, but none of the other routers on the multi-point segment will form an adjacency.  They will, however, be neighbors.

Thanks,

Dan

Silver

Re: OSPF Neighbor v OSPF Adjacency

Hello Dan,

Indeed. There is an important concepts in OSPF which is the OSPF network type of an interface.

OSPF defines 5 network types :

- Point-to-point networks
- Broadcast networks (Or mutltiaccess)
- Nonbroadcast Multiaccess (NBMA) networks
- Point-to-multipoint networks
- Virtual links

The concept of DR/BDR applies to Broadcast networks (or multiaccess segment) and NBMA netwrks in order to improves LSA flooding efficiency for the reason described in the previous notes.

(Note an adjacency is established by all routers of the multiaccess segement/NBMA with DR and BDR), others just stop to neighbor relationship..

On point-to-point networks valid neighbors will always become adjacent, because with only two routers on the subnet.

NBMA networks, such as X.25, Frame Relay, and ATM, are capable of connecting more than two routers but have no broadcast capability. As a result, extra configuration might be necessary for routers on these networks to acquire their neighbors. OSPF routers on NBMA networks elect a DR and BDR, and all OSPF packets are unicast.

Point-to-multipoint networks are a special configuration of NBMA networks in which the networks are treated as a collection of point-to-point links. Routers on these networks do not elect a DR and BDR, and the OSPF packets are unicast to each known neighbor.

So,

About the scenario of your lab I would check with the "show ip ospf interface" and check the State (BROADCAST ; POINT-TO-POINT, Non BROADCAST ....) value in order to see if it makes sense. Also use 'show ip ospf neighbor'.

I hope that helps.

Cheers!

Karim

Hall of Fame Super Silver

Re: OSPF Neighbor v OSPF Adjacency

Hello Karim, Peter, Daniel

excellent thread and useful info you are taking full advantage of advanced features of the forum platform to post pictures, tables and links

This can be used to study and review this subject.

5P for most  posts!

Best Regards

Giuseppe

Cisco Employee

Re: OSPF Neighbor v OSPF Adjacency

Hello Giuseppe,

Thank you wholeheartedly for your kind words and ratings!

Best regards,

Peter

Silver

Re: OSPF Neighbor v OSPF Adjacency

Giuseppe,

Many thanks for you encouragements and continuous expertise on the forum. I greatly appreciate.

Kind Regards;

Karim

14382
Views
35
Helpful
9
Replies