Neighbor adjacencies

📘 CCNA 200-301 v1.1

3.4 Configure and Verify Single Area OSPFv2

3.4.a Neighbor Adjacencies


🔹 What is OSPF?

OSPF (Open Shortest Path First) is a link-state routing protocol used by routers to exchange routing information within an Autonomous System (AS).
In simple terms — routers using OSPF share information about their network links and calculate the best path to reach each network using the Shortest Path First (SPF) algorithm developed by Dijkstra.


🔹 What is a Neighbor Adjacency?

In OSPF, neighbor adjacency means a relationship formed between two OSPF routers that are directly connected and configured to exchange OSPF information.

Before routers can exchange OSPF routing updates, they must first discover each other and form a neighbor relationship (called adjacency).
Without adjacency, no OSPF routes will be shared.


How OSPF Routers Form Neighbor Adjacencies

When two routers connected to the same network segment have OSPF enabled on their interfaces, they go through several stages to become neighbors.

Let’s go through all OSPF Neighbor States (this is important for the CCNA exam).


🧩 OSPF Neighbor States

StateDescriptionWhat Happens
DownNo Hello packets have been received from the neighbor.Router has no OSPF neighbor information yet.
InitRouter has received a Hello packet from the neighbor, but it hasn’t seen itself listed in the neighbor’s Hello packet yet.One-way communication.
2-WayBoth routers see each other’s router ID in Hello packets.Two-way communication established. Neighbors are now discovered.
ExStartRouters decide which one will be the master and which one will be the slave to begin exchanging database information.Negotiation phase.
ExchangeRouters exchange Database Description (DBD) packets describing their LSDBs (Link-State Databases).They list what LSAs they know about.
LoadingRouters request missing LSAs using Link-State Request (LSR) and send Link-State Update (LSU) packets.Full synchronization in progress.
FullRouters have fully synchronized LSDBs.Full adjacency is formed; they are now neighbors and can route traffic.

🔹 Neighbor Formation Process (Simplified IT Example)

Let’s imagine Router R1 and Router R2 are connected on the same subnet.

  1. Both routers have OSPF enabled on their interfaces. R1(config)# router ospf 1 R1(config-router)# network 10.1.1.0 0.0.0.255 area 0
  2. R1 sends Hello packets out its OSPF-enabled interface to the multicast address 224.0.0.5 (All OSPF routers).
  3. R2 receives the Hello packet, checks its OSPF settings (area ID, hello/dead timers, network type, etc.)
    If these parameters match, R2 replies with its own Hello packet.
  4. R1 and R2 see each other’s Router IDs in the Hello packets → they move to the 2-Way state.
  5. Routers then exchange database information (DBD packets) → ExStart and Exchange states.
  6. They request missing LSAs (Loading state) and then synchronize fully (Full state).

At this point, R1 and R2 are neighbors and will exchange link-state updates as needed.


🔹 Conditions Required to Form OSPF Neighbor Adjacencies

For two routers to become OSPF neighbors, several parameters must match:

ParameterDescription
Area IDMust be in the same OSPF area (e.g., area 0).
Subnet/NetworkInterfaces must be in the same subnet.
Hello and Dead TimersMust match (default: Hello 10s, Dead 40s on broadcast links).
AuthenticationIf OSPF authentication is enabled, passwords/keys must match.
Network TypeMust match (e.g., broadcast, point-to-point).
MTU SizeShould be the same to avoid adjacency issues.
Stub FlagBoth routers must have the same stub area configuration.

If any of these parameters don’t match, the routers will stay stuck in the INIT or EXSTART state, and adjacency will not form.


🔹 Verifying OSPF Neighbor Adjacencies

After configuration, you can verify OSPF neighbors using IOS commands:

Command:

show ip ospf neighbor

📋 Output Example:

R1# show ip ospf neighbor

Neighbor ID     Pri   State           Dead Time   Address         Interface
2.2.2.2           1   FULL/DR         00:00:35    10.1.1.2        Gig0/0

Explanation:

  • Neighbor ID: The Router ID of the neighbor.
  • Pri: OSPF interface priority (used in DR election).
  • State: The current adjacency state (e.g., FULL, 2-WAY).
  • Dead Time: Time before declaring neighbor dead if no Hellos are received.
  • Address: Neighbor’s IP address.
  • Interface: Local interface used to connect to the neighbor.

🔹 Important Notes for Exam:

  • OSPF uses multicast 224.0.0.5 to send Hello packets (to all OSPF routers).
    OSPF DR/BDR uses 224.0.0.6 for communication.
  • Neighbor relationships are formed only on directly connected interfaces.
  • In broadcast and non-broadcast networks, not all routers form full adjacencies — only with the DR (Designated Router) and BDR (Backup Designated Router).
  • Point-to-point links always form full adjacency (since there are only two routers).

🔹 Troubleshooting Common Neighbor Adjacency Problems

ProblemLikely Cause
Neighbor stuck in INITMismatch in Hello or Dead timer, or wrong subnet.
Neighbor stuck in EXSTARTMTU mismatch or OSPF bug.
Neighbor not appearingArea ID mismatch, interface not OSPF-enabled, wrong network command.
Authentication failurePasswords/keys don’t match.
Interface downPhysical or Layer 2 issue.

Use:

debug ip ospf adj
debug ip ospf hello

to analyze adjacency formation step-by-step (in lab environments).


🧠 Summary (Key Points for CCNA)

If neighbors don’t reach Full state, check for mismatched configurations or network issues.

OSPF forms neighbor adjacencies to share routing information.

Routers go through 7 neighbor states (Down → Init → 2-Way → ExStart → Exchange → Loading → Full).

Matching parameters (Area ID, timers, authentication, etc.) are essential.

Use show ip ospf neighbor to verify adjacency.


Leave a Reply

Your email address will not be published. Required fields are marked *

Buy Me a Coffee