OSPF · Topic 2 of 5
Adjacencies, Neighbors and the DR and BDR
Learn OSPF neighbor states from Down to Full, network types, and how the designated router and backup designated router are elected on Junos for JN0-352.
- 5 min
- Neighbor states: Down, Init, 2Way, ExStart, Exchange, Loading, Full.
- Full adjacency is formed only with the DR and BDR on a broadcast segment; DROthers stay 2Way.
- Election: highest priority, then highest router ID; priority 0 is not eligible.
What it is
An OSPF neighbor is another OSPF router on the same link that you have exchanged Hello packets with. An adjacency is a deeper relationship: two neighbors that have also synchronized their link state databases. Only adjacent routers exchange LSAs.
On a broadcast segment such as Ethernet, forming an adjacency between every pair of routers would create too many. OSPF elects a designated router (DR) and a backup designated router (BDR). Every other router becomes adjacent only with those two.
How it works
Neighbor states
| State | Meaning |
|---|---|
| Down | No Hello received |
| Init | A Hello was received, but it does not list this router's ID yet |
| 2Way | Both routers see each other in Hellos; the DR and BDR are elected here |
| ExStart | The master and slave for the database exchange are chosen |
| Exchange | Database description packets summarize the LSDB |
| Loading | Link state requests and updates fetch the missing LSAs |
| Full | The databases are synchronized; the adjacency is complete |
The states are shown by show ospf neighbor:
user@router> show ospf neighbor
Address Interface State ID Pri Dead
10.1.1.2 ge-0/0/1.0 Full 10.255.0.2 128 35
10.1.1.3 ge-0/0/1.0 2Way 10.255.0.3 100 33
The second line is normal on a broadcast segment. Two routers that are neither the DR nor the BDR (called DROthers) stay at 2Way with each other. Only the DR and BDR reach Full with everyone.
What must match for a neighbor to form
- Same area ID on the link.
- Same subnet and mask (broadcast and NBMA links).
- Same hello and dead intervals.
- Same authentication type and key.
- Same stub area flag.
- Unique router IDs.
- Compatible MTU, or the adjacency stalls at ExStart or Exchange.
What the stuck states tell you
| Stuck in | Likely cause |
|---|---|
| Down or no neighbor | No Hello arrives: the link is down, the interface is not in OSPF, a firewall filter drops OSPF, or the interface is passive |
| Init | You receive Hellos, but the other side does not receive yours or rejects them (one way) |
| 2Way (not DROther pair) | The routers are not eligible for DR, such as both with priority 0 |
| ExStart or Exchange | MTU mismatch, or a problem with large packets |
| Loading | Lost or filtered LSU packets, or a corrupted LSA |
Network types
The network type decides whether a DR is elected and how Hellos are sent.
| Network type | DR election | Typical interface |
|---|---|---|
| Broadcast | Yes | Ethernet, the Junos default for Ethernet |
| Point-to-point | No | Serial links, or Ethernet configured as point to point |
| Point-to-multipoint | No | Partial mesh WAN |
| NBMA | Yes | Frame Relay style networks with neighbors listed by hand |
On a link between exactly two routers, interface-type p2p removes the DR election, and the adjacency forms faster:
user@router# set protocols ospf area 0.0.0.0 interface ge-0/0/1.0 interface-type p2p
Both ends of a link must use the same network type. If one side is p2p and the other broadcast, Hellos still arrive, but the two sides behave differently and the result is unreliable.
DR and BDR election
The election happens on each broadcast or NBMA segment, when routers reach 2Way.
- The router with the highest interface priority wins. The Junos default priority is 128.
- If priorities tie, the highest router ID wins.
- Priority 0 makes a router ineligible to be the DR or BDR.
- The router with the second best result becomes the BDR.
The election is not preemptive. A router with a higher priority that joins later does not take the role from the existing DR. The roles change only if the DR fails, or the OSPF process restarts.
user@router# set protocols ospf area 0.0.0.0 interface ge-0/0/1.0 priority 200
The DR sends updates to 224.0.0.5, and DROthers send updates to 224.0.0.6, the all designated routers group. The DR floods them on to the segment. The DR also originates the network LSA (type 2) for the segment.
user@router> show ospf interface
Interface State Area DR ID BDR ID Nbrs
ge-0/0/1.0 DR 0.0.0.0 10.255.0.1 10.255.0.2 2
To make a router the DR, set its priority higher on that router, then clear the OSPF neighbors on the others or restart the process. Raising a priority alone does nothing while a DR exists.
Common mistakes
Calling 2Way between DROthers a fault. It is the normal final state for two non-DR routers on a broadcast link.
Expecting a new high priority router to become DR. The election does not preempt.
Using priority 0 and then expecting to see it in the election. Priority 0 is never elected.
Leaving a two router Ethernet link as broadcast. It works, but the DR election is unnecessary. Use interface-type p2p.
Mismatched timers. A router with hello 10 and dead 40 does not form a neighbor with one using hello 5 and dead 20.
What to remember for the exam
- Neighbor states: Down, Init, 2Way, ExStart, Exchange, Loading, Full.
- Full adjacency is formed only with the DR and BDR on a broadcast segment; DROthers stay 2Way.
- Election: highest priority, then highest router ID; priority 0 is not eligible.
- Junos default priority is 128; the election does not preempt.
- Broadcast and NBMA elect a DR; point to point and point to multipoint do not.
- Area, timers, authentication, subnet and the stub flag must match; MTU problems stall at ExStart.
show ospf neighborandshow ospf interfaceshow states and the DR and BDR.
Check yourself
Two DROther routers on an Ethernet segment show 2Way with each other. Is that a problem?
No, DROthers form full adjacencies only with the DR and BDR, so 2Way between them is normal.
A new router with priority 255 joins a segment that already has a DR. Does it become the DR?
No, the DR election is not preemptive, so it becomes the DR only if the current DR fails or OSPF restarts.
An adjacency stays in ExStart. What is the most likely cause?
An MTU mismatch between the two interfaces.
Topic 2 of 5 in OSPF
Test yourself on OSPF
The full Juniper JNCIS-ENT JN0-352 question bank has 846 questions, with timed practice exams and an explanation for every answer.
This study guide is independent and is not affiliated with, endorsed by, or sponsored by Juniper. Vendor names, certification names and exam codes are trademarks of their respective owners and are used for identification only.