OSPF Neighbor States – Complete Guide with Examples

✅ Overview of OSPF Neighbor FSM (Finite State Machine)

The OSPF Neighbor Finite State Machine (FSM) defines the step-by-step process that two OSPF routers go through to form an adjacency.

  • Build neighbor relationships
  • Synchronize routing information
  • Prevent routing loops

✅ Purpose of OSPF Neighbor States

  • Ensure reliable and ordered exchange of link-state information.
  • Control the formation of adjacencies only where necessary (e.g., with DR/BDR).
  • Provide a structured mechanism to detect and recover from neighbor issues.

✅ OSPF Adjacency Process Flow

  1. Routers send Hello packets to discover neighbors.
  2. Routers go through seven neighbor states.
  3. Full adjacency is formed only with DR/BDR (on multi-access networks) or all neighbors (on point-to-point links).

✅ OSPF Neighbor States (in Order)

OrderState
1Down
2Init
32-Way
4ExStart
5Exchange
6Loading
7Full

✅ Meaning and Role of Each State

  • Down: No Hello packets received. Initial state.
  • Init: Hello received, but our RID not listed yet.
  • 2-Way: Bi-directional Hello exchange; DR/BDR elected here.
  • ExStart: Master/slave negotiation for DB exchange.
  • Exchange: DBD packets sent/received.
  • Loading: Missing LSAs requested and sent.
  • Full: LSDBs fully synchronized.

✅ OSPF Packet Types and Their Role in States

Packet TypePurposeUsed In State
HelloDiscover and maintain neighborsDown, Init, 2-Way
DBDDescribe contents of LSDBExStart, Exchange
LSRRequest specific LSAsLoading
LSUSend requested LSAsLoading
LSAckAcknowledge LSUsLoading

✅ Neighbor State Transitions

From StateTo StateTrigger
DownInitReceived Hello
Init2-WayNeighbor sees our Router ID
2-WayExStartDR/BDR election or P2P
ExStartExchangeDBD exchange
ExchangeLoadingMissing LSAs detected
LoadingFullAll LSAs received

✅ Timers (Hello/Dead)

Default Hello Interval: 10s, Dead Interval: 40s

Mismatch prevents adjacency.

✅ DR/BDR Influence

  • DROTHERs form FULL state only with DR/BDR
  • DROTHER ↔ DROTHER = 2-Way

✅ Troubleshooting Stuck States

StateIssue Cause
InitUnidirectional Hello (timers or L2)
ExStartMTU mismatch, duplicate RIDs, DR/BDR mismatch
LoadingLSA corruption, authentication mismatch

✅ Useful Commands

show ip ospf neighbor
show ip ospf interface
debug ip ospf adj
debug ip ospf hello
show interface <int> | include MTU
    

✅ Summary Table of OSPF Neighbor States

StateDescriptionCommon Packet Type
DownNo Hello received
InitHello received, we not seen yetHello
2-WayBi-directional HelloHello
ExStartMaster/slave negotiationDBD
ExchangeExchange of LSA headersDBD
LoadingRequesting LSAsLSR, LSU, LSAck
FullSynchronized LSDB

OSPF Neighbor States Quiz

1. What is the first OSPF neighbor state when no Hello packets have been received?

Correct answer is A. Down state means no Hello packets received yet.

2. In which OSPF neighbor state does bidirectional communication occur?

Correct answer is D. 2-Way state indicates bidirectional Hello packet exchange.

3. During which state do OSPF routers negotiate master/slave roles?

Correct answer is C. ExStart is when routers decide who is master or slave.

4. What packet type is used during the Exchange state to describe the LSDB contents?

Correct answer is B. DBD packets list LSDB contents during Exchange state.

5. Which OSPF neighbor state requests missing LSAs using LSR packets?

Correct answer is A. Loading state uses LSR packets to request missing LSAs.

6. In broadcast networks, why do DROTHER routers remain in the 2-Way state with each other?

Correct answer is D. DROTHER routers stay in 2-Way state with each other to minimize overhead.

7. What causes OSPF neighbors to get stuck in the ExStart state?

Correct answer is B. MTU mismatch and duplicate RIDs can cause ExStart to be stuck.

8. Which command shows detailed OSPF neighbor information including state and DR/BDR?

Correct answer is A. This command lists neighbors with their OSPF states and roles.

9. What is the default Hello interval on a broadcast network?

Correct answer is C. The default Hello interval on broadcast networks is 10 seconds.

10. What OSPF neighbor state indicates that routers are fully adjacent and databases synchronized?

Correct answer is B. Full state means adjacency is complete and LSDBs are synchronized.

← Back to Home