Courseiva
300-410Chapter 2 of 17Objective 3.1

OSPF Neighbor Adjacency and Basics

How do routers in a large network automatically learn about every possible path, even when connections change? Without a system like OSPF, you’d have to manually type in every route on every single router, which is impossible at scale. Understanding how OSPF routers discover each other and form a trusted partnership — called a neighbour adjacency — is the foundation for passing the 300-410 exam and for building networks that fix themselves when a link fails.

12 min read
Intermediate
Updated Jul 23, 2026
Editorial oversight: Johnson Ajibi· Security Systems Architect · MSc IT Security · IEEE Senior Member

A simple way to picture OSPF Neighbor Adjacency and Basics

The Friendly Neighbourhood Meetup Analogy

Have you ever moved into a new apartment building and wanted to set up a community watch? How do you even start to get to know your neighbours?

You don't just shout into the hallway and hope everyone responds. First, you knock on a specific door. The person inside has to hear you, decide they're willing to talk, and open the door. That's the 'Hello' stage. If they open, you introduce yourself and exchange basic info — your name, your apartment number. But before you start sharing house keys and security codes, you both need to agree on the ground rules. Do you share a wall? Are you both home at the same times? Will you take the same shifts watching the street? This negotiation is the 'Details' stage. Once you both agree on how you'll work together, you're officially 'adjacent' — you have a working relationship. You can now share urgent news, like 'I saw a suspicious van,' and trust it will be handled correctly. If at any point one of you stops responding, the relationship times out and you start over. That’s exactly how OSPF works. It’s a methodical, step-by-step process of introducing routers to each other, agreeing on the rules of engagement, and then maintaining that relationship to share critical network information about where data should go.

How It Actually Works

Let’s start from absolute zero. A router is a specialised computer that moves data between different networks (like your home network and the internet). For that data to take the best path, every router needs a map — this is called a 'routing table'. OSPF (Open Shortest Path First) is a protocol, a set of rules, that lets routers automatically build that map by talking to each other.

Before any map-making can happen, two routers have to find each other and agree to become neighbours. This is called an 'adjacency'. Think of it as a formal relationship status: 'We are neighbours.' No map data is shared until this status is confirmed.

We need to understand what triggers the conversation. A router using OSPF sends a special message called a 'Hello packet' out of its interfaces (the physical or virtual ports it uses to connect to cables). This is the knock on the door. The Hello packet contains key information: the router's unique ID (called a Router ID, usually the highest IP address on the router), what 'area' the router belongs to (OSPF can divide a network into areas to keep maps smaller), and timers that define how often the router sends hellos ('Hello Interval').

When router B receives this Hello, it checks the information for compatibility. Is router A in the same area? That’s like checking if you live on the same floor. Are the timers the same? That’s like agreeing on how often you’ll check in with each other. If these match, router B sends a Hello back, adding router A’s Router ID to its list of 'seen' neighbours. Router A then sees its own ID in router B’s Hello, and it knows router B has received the message. They have now reached the '2-Way State'. They are neighbours, but they aren't fully adjacent yet. On most network types (like a simple Ethernet connection to another router), they don't stop here — they proceed to 'ExStart'.

In ExStart (Exchange Start), the two routers decide who will be the 'master' and who will be the 'slave' for the next conversation. This is just a way to prevent talking over each other. The router with the higher Router ID wins and becomes the master.

Next is 'Exchange'. Here, the routers share their 'LSDB' — Link State Database. This is their entire map of what they know about the network. They send 'Database Description (DBD)' packets, which are like chapter summaries of their map. They don't send the whole map at once because that would be too much data. They check the summaries to see what the other router already knows.

If router A sees a summary for a network it doesn't know about, it sends a 'Link State Request (LSR)' — 'Hey, give me the details on that chapter.' Router B responds with a 'Link State Update (LSU)' — the full details. Router A then sends a 'Link State Acknowledgement (LSAck)' — 'Got it, thanks.' This process happens until both routers have identical maps.

Finally, they reach the 'Full State'. They are fully adjacent. They now have the same Link State Database. From this database, OSPF runs the Dijkstra algorithm (named after its creator) to calculate the shortest path to every destination. This calculation populates the routing table.

Why does this process exist? It replaces the old way (static routing), where humans had to manually configure every possible path. That was error-prone and didn't adapt to failures. OSPF automates the discovery and recovery, which is vital for large networks like corporate campuses or internet service providers. If a cable is cut, the routers detect the neighbour is dead (because they stop receiving Hello packets), recalculate, and update their routing tables — all without a human touching them.

The flow of OSPF neighbour adjacency from the initial Hello discovery through parameter checks, DR/BDR election, database exchange, and finally to full synchronisation and route calculation.

Walk-Through

1

Activate OSPF and enter Router Configuration Mode

The engineer enters global configuration mode and runs 'router ospf [process-id]' (e.g., 'router ospf 1'). This starts the OSPF process. Without this step, nothing else happens. The process-ID is a local label, not an identifier shared with neighbours.

2

Configure Network Statements to Enable OSPF on Interfaces

The engineer uses 'network [network-address] [wildcard-mask] area [area-id]' to tell the router which interfaces should participate in OSPF. For example, 'network 10.0.0.0 0.255.255.255 area 0'. The wildcard mask is the inverse of a subnet mask, and the area must match on all routers for adjacencies to form.

3

Hellos are Sent and Received (Discovery)

Once OSPF is enabled on an interface, the router starts sending Hello packets to the multicast address 224.0.0.5 (ALLSPFRouters) every Hello Interval (default 10 seconds). Other OSPF routers on the same link listen for these hellos. This is the discovery phase.

4

Router ID Comparison and 2-Way State

When a router receives a Hello that contains its own Router ID, it moves to the 2-Way state. At this point, both routers have a list of each other as neighbours. However, depending on the network type (broadcast vs. point-to-point), they may or may not proceed further. In point-to-point, they proceed immediately. In broadcast, they wait for the DR/BDR election.

5

DR/BDR Election (if on a broadcast network)

Routers compare their OSPF priority (default 1) and Router ID. The router with the highest priority becomes the DR, the second highest becomes the BDR. Ties are broken by the highest Router ID. Only DR and BDR form full adjacencies with all other routers on the segment.

6

Database Synchronisation (ExStart, Exchange, Loading, Full)

Routers enter ExStart to negotiate who is master/slave for the conversation. In Exchange, they send DBD packets summarizing their LSDBs. If a router sees it is missing information, it sends LSRs and receives LSUs in the Loading state. Once both have identical databases, they reach the Full state.

7

Route Calculation and Installation

After the adjacency is FULL and the LSDB is synchronised, the router runs the SPF (Shortest Path First) algorithm (Dijkstra) to calculate the best loop-free paths to all destinations. These paths are installed in the routing table. The adjacency must be maintained with periodic Hellos or it will reset.

What This Looks Like on the Job

Imagine you are a network engineer for a company called 'FastPath Corp' with offices in London, Manchester, and Birmingham. Each office has its own router connecting to a central router in a data centre. You've been asked to configure OSPF so that the London office can reliably send data to a server in Birmingham, even if the direct link between London and the data centre goes down.

Your first job is to configure OSPF on each router. In a real Cisco network, you access the router's command-line interface (CLI). You type commands like 'router ospf 1', which starts the OSPF process with a process ID of 1 (the number is locally significant, just a label). Then you specify which networks to advertise using 'network' statements, like 'network 192.168.1.0 0.0.0.255 area 0'. The 'area 0' part is critical — all routers must be in area 0 to form adjacencies.

After you write the configuration to the router's memory (copy run start), you need to verify the relationships. You cannot just assume it works. You would SSH into the London router and run the command 'show ip ospf neighbor'. This command reveals the current state of every potential neighbour. You see output like this: Neighbor ID 10.1.1.2, interface GigabitEthernet0/0, state FULL. That 'FULL' state is exactly what you want. It means the adjacency is fully formed. If you see '2WAY', that usually means the routers are neighbours but haven't exchanged databases yet — this happens on multi-access networks (like a switch connecting many routers) where not every pair needs to go to Full.

Now, let's add a problem. The Manchester link goes down. You, as the engineer, don't need to do anything. The London router stops receiving Hello packets from the Manchester router within 40 seconds (4 times the default Hello Interval of 10 seconds). The London router moves the connection from the routing table to 'dead', runs the Dijkstra algorithm again on its existing database, and finds a path to Birmingham via the data centre. End users see a 30-second interruption, but then the network self-heals.

What tools do you use day-to-day? - 'debug ip ospf adj' to watch adjacency events in real time when troubleshooting a new connection. - 'show ip ospf interface' to see timers and the current state of the interface. - 'clear ip ospf process' to reset all OSPF relationships — a nuclear option when things go wrong.

When you join a new company, you'll often spend time checking for 'mismatched' parameters. The most common real-world issue is that someone configured the 'network' type differently on two ends (like one side thinks it's a point-to-point link and the other thinks it's a broadcast network). This stops hellos from being exchanged, and no adjacency forms. You learn to check Hello and Dead Intervals first using 'show ip ospf neighbor' and 'show ip ospf interface'.

Finally, understanding OSPF states helps you diagnose network connectivity. If you see 'EXSTART' or 'EXCHANGE' stuck for a long time, something is blocking the DBD packets, often a faulty switch or a misconfigured access control list (ACL). If you see 'LOADING', one router just isn't getting the detailed updates. This real-world diagnostic skill is what separates someone who just passed a test from someone who can actually fix the network.

How 300-410 Actually Tests This

The 300-410 ENARSI exam loves to test your understanding of the OSPF neighbour adjacency state machine in detail. You will not just be asked 'what is a neighbour adjacency?' You will be given a scenario: an engineer configures OSPF on two routers, and the adjacency is stuck in a particular state. You must identify the cause and fix it.

Here are the exact exam traps they set:

They will configure mismatched Hello or Dead Intervals. One router has a Hello Interval of 10 seconds, the other has 5 seconds. The routers will see the hello packets but will never progress past the INIT state because the timers don't match. You must know that the interfaces must have matching timers to form an adjacency.

They will put one router in a different area. If Router A is in area 0 and Router B is in area 1 (with no Area Border Router between them), the hello packets will be ignored because the area field in the Hello packet doesn't match. The adjacency will never form.

They will misconfigure the network type. If one interface is set to 'point-to-point' and the other to 'broadcast', the hello packets will not be properly processed, and the adjacency will stall. You must know that 'show ip ospf interface' displays the network type.

They will test your knowledge of OSPF states in order. You might see: Down, Init, 2-Way, ExStart, Exchange, Loading, Full. A common question is: 'In which state is the DR/BDR (Designated Router/Backup Designated Router) elected?' The answer is the 2-Way state. This election happens only on multi-access networks (like Ethernet).

They will give you 'show ip ospf neighbor' output and ask you to interpret it. For example, 'Neighbor state is FULL/DROTHER'. 'DROTHER' means 'Designated Router Other' — this router is not the DR or BDR, but it is fully adjacent (FULL) with both of them.

Key definitions to memorise for the exam:

Hello protocol: The mechanism used to discover neighbours and maintain relationships. Default Hello interval is 10 seconds on broadcast networks, 30 seconds on non-broadcast.

Dead Interval: The time (default 4 times the Hello Interval) after which a neighbour is declared dead. Default is 40 seconds.

Router ID: A 32-bit number identifying the router in OSPF. It can be manually set or is derived from the highest loopback IP address or highest active interface IP.

DB Description (DBD) packet: Contains a summary of the LSDB, allowing routers to see what the other knows without sending the entire database.

LSA (Link State Advertisement): Individual pieces of the database that describe a router's links and networks.

The exam roughly asks 5-7 questions on this specific topic. Expect multiple-choice single-answer, multiple-choice multiple-answer, and 'drag and drop' ordering questions where you have to put the OSPF states in the correct order. The traps are almost always about mismatched parameters or the precise state in which a specific event occurs (like LSA exchange starting in ExStart). If you can memorise the 7 states and what happens in each, and you can troubleshoot a stuck adjacency by checking timers, area, and network type, you will pass this objective.

Key Takeaways

OSPF neighbour adjacency is a multi-step state machine: Down, Init, 2-Way, ExStart, Exchange, Loading, Full.

For two routers to form an adjacency, their Hello and Dead Intervals, area ID, and network type must match on the connecting interfaces.

The Designated Router (DR) and Backup Designated Router (BDR) are elected during the 2-Way state on multi-access networks to reduce the number of full adjacencies.

The Router ID must be unique across the OSPF domain and is chosen from the highest loopback IP, or the highest physical interface IP, or by manual configuration.

The 'show ip ospf neighbor' command is the primary verification tool to check the state of each neighbour relationship.

An adjacency stuck in INIT state indicates a Layer 2 issue or a one-way communication problem, while stuck in EXSTART suggests a mismatch in MTU (Maximum Transmission Unit) size.

OSPF does not require the process ID (the number in 'router ospf X') to match between neighbours; it is locally significant.

The primary purpose of OSPF adjacency is to synchronise the Link State Database (LSDB), not to exchange routes directly.

Easy to Mix Up

These come up on the exam all the time. Here's how to tell them apart.

Hello Protocol

Used to discover neighbours and maintain the relationship.

Sent periodically (default every 10 seconds on Ethernet).

Contains Router ID, Area ID, and timers but no map data.

Database Description (DBD)

Used during the Exchange state to summarise the Link State Database.

Sent only once during the adjacency formation process.

Contains summaries of LSAs to check which information is missing.

Point-to-Point Network

Only two routers on the link; no DR/BDR election occurs.

Router automatically proceeds from 2-Way to ExStart immediately.

Simple to configure and troubleshoot.

Broadcast Network

Multiple routers share the same Ethernet segment.

Requires DR/BDR election to reduce full adjacencies.

Non-DR routers form only 2-Way state with each other, not Full.

2-Way State

Indicates bidirectional communication has been established.

No database exchange has occurred yet.

This is the final state for non-DR routers on a broadcast network.

Full State

Indicates the Link State Database is fully synchronised.

Both routers have identical LSDBs.

Required before SPF can calculate routes; final adjacency state.

OSPF Process ID

A local number assigned to the OSPF process on a single router.

Does not need to match between neighbours.

Only used for administrative purposes on the local device.

OSPF Router ID

A 32-bit identifier that must be unique across the entire OSPF domain.

Used to identify neighbours and in DR/BDR election.

Chosen from loopback IP, physical IP, or manual configuration.

INIT State

The first state after seeing a Hello from a neighbour.

Indicates one-way communication; the neighbour hasn't seen us yet.

Stuck here suggests a firewall or ACL blocking return Hellos.

EXSTART State

The state before database exchange begins.

Routers negotiate master/slave roles using Router ID.

Stuck here often indicates an MTU mismatch on the interface.

Watch Out for These

Mistake

Once OSPF is configured, routers automatically become neighbours immediately without any further checks.

Correct

Routers must pass through a multi-step process (Down, Init, 2-Way, ExStart, Exchange, Loading, Full) and must match several parameters (area, timers, network type, authentication) before they become fully adjacent.

Beginners assume that because the configuration is simple ('router ospf 1' and a network statement), the relationship is instant. They don't realise that compatibility checks occur in the background.

Mistake

All OSPF routers in the same network must form a full adjacency (FULL state) with each other.

Correct

On multi-access networks (like Ethernet with a switch), only the Designated Router (DR) and Backup Designated Router (BDR) form full adjacencies with all other routers. Other routers only reach the 2-Way state with each other to reduce the number of adjacencies.

People see the word 'adjacency' and think it is always FULL. They don't understand the DR/BDR election mechanism, which is designed to reduce the overhead of too many relationships.

Mistake

The process ID used in 'router ospf 1' must match between routers for them to become neighbours.

Correct

The OSPF process ID is locally significant on each router. Router A can use 'router ospf 1' and Router B can use 'router ospf 100' and they can still become neighbours as long as other parameters (area, timers, network type) match.

In other routing protocols like EIGRP, the Autonomous System (AS) number must match. Beginners carry this expectation over to OSPF incorrectly.

Mistake

The Router ID is the IP address of the first interface that comes up.

Correct

The Router ID is chosen based on the highest IP address of any loopback interface (a virtual interface) first, if one exists, then the highest IP of any physical interface. It can also be manually set with the 'router-id' command. It must be unique among all routers in the OSPF domain.

Because the process seems automatic, beginners think it's just the interface IP. They don't know about the loopback priority and don't understand why changing interface IPs can break OSPF (because the Router ID changes, forcing all adjacencies to reset).

Mistake

OSPF neighbour adjacency is the same as OSPF routing.

Correct

Neighbour adjacency is just the relationship. OSPF routing occurs after the adjacency is established, when the Link State Database is synchronised and the Dijkstra algorithm calculates the best paths. You can have an adjacency without any routes installed.

New learners conflate 'neighbour' with 'route'. They think if they see 'FULL' in show ip ospf neighbor, route traffic will flow. There could still be no routes if the network statements are misconfigured.

Do You Actually Know This?

Reveal each answer, then mark whether you got it right. Score 60%+ to unlock the next chapter.

Frequently Asked Questions

Do both routers need the same OSPF process ID to form an adjacency?

No. The process ID is locally significant and does not need to match between neighbours. Router A can use process 1 and Router B can use process 100 and they can still form a full adjacency if all other parameters (area, timers, network type) match.

What does 'show ip ospf neighbor' show me?

It shows a list of all other OSPF routers that this router has discovered, their Router IDs, the interface they were heard on, their priority, the current state of the adjacency (e.g., FULL, 2WAY), and a dead time counter for when this neighbour will be considered dead if no Hello is heard.

What does it mean if the OSPF state is '2WAY/DROTHER'?

It means this router is not the DR or BDR on that multi-access segment, but it has an adjacency with the DR and BDR. The '2WAY' is between non-DR/BDR routers, but the output shows a single state from the perspective of the router you are looking at, so it indicates bidirectional communication but not a full database exchange between these two non-DR routers.

Why is my OSPF adjacency stuck in 'INIT' state?

The INIT state means your router has received a Hello from the neighbour, but the neighbour has not yet seen your router's Router ID in a Hello packet. This usually indicates a one-way connectivity issue — like an access list blocking return traffic, or a switch port in the wrong VLAN only allowing traffic in one direction. Check your firewall rules and access-lists.

What is the default Hello and Dead Interval for OSPF on an Ethernet network?

On broadcast (Ethernet) and point-to-point networks, the default Hello Interval is 10 seconds, and the Dead Interval (the time to wait before declaring a neighbour dead) is 40 seconds (4 times the Hello Interval). On non-broadcast multi-access (NBMA) networks, the default Hellos are 30 seconds and Dead is 120 seconds.

Why do I see 'FULL' for one neighbour but '2WAY' for another on the same router?

This is normal on a multi-access broadcast network (like Ethernet with a switch). The router with the 'FULL' state is likely the Designated Router (DR) or Backup Designated Router (BDR). The neighbour showing '2WAY' is a non-DR/BDR router. Only DR and BDR form full adjacencies with all other routers; other routers settle at the 2WAY state between themselves to reduce overhead.

Terms Worth Knowing

Keep going

You've finished OSPF Neighbor Adjacency and Basics. Continue through the 300-410 study guide to build a complete picture of the exam.

Done with this chapter?