On an OSPF broadcast LAN, why do some neighbours stay in 2-Way while others reach Full, and how many adjacencies does that save?
answer
- adjacency is a choice made at 2-Way
- everyone syncs with two routers
- 2n minus 3
- control plane, not forwarding path
basics
~20 sOn broadcast and NBMA networks, OSPF routers become adjacent only with the DR and BDR, so other pairs stop at 2-Way by design: 2n − 3 adjacencies instead of n(n − 1)/2, or 17 instead of 45 for ten routers.
solid answer
~50 sRFC 2328 makes the adjacency decision at 2-Way: a bidirectional neighbour becomes adjacent only if the link is point-to-point, Point-to-MultiPoint or a virtual link, or if either router is the DR or the BDR. On a LAN, two routers in the `DR Other` role therefore see each other, list each other in Hellos and stop at 2-Way; that is correct, not a fault. Each DR Other is Full with the DR and the BDR, and the DR and BDR are Full with each other, giving 2(n − 2) + 1 = 2n − 3 adjacencies instead of a full mesh's n(n − 1)/2. Two DR Others still forward data straight to each other across the LAN; the adjacency only decides who synchronises databases with whom. A 2-Way neighbour is a real fault on a point-to-point link, or when one of the pair is the DR or BDR.
go deeper
Know that on an OSPF LAN, routers that are neither DR nor BDR stay in 2-Way with each other, and that this is normal.
Explain the adjacency rule taken at 2-Way and work out 2n − 3 against n(n − 1)/2 for a given segment size.
Tell a healthy 2-Way from a fault: a point-to-point link, a DR or BDR stuck at 2-Way, or a LAN where every priority is 0.
Weigh a large shared segment with a DR against splitting it into point-to-point links, considering adjacency count, failover and how failures spread.
## The rule in RFC 2328 OSPF separates **neighbours**, routers that exchange Hellos and have confirmed two-way communication, from **adjacencies**, neighbours that synchronise their link-state databases. The step from one to the other is a decision taken in the **2-Way** state. RFC 2328 section 10.4 says an adjacency is formed with a bidirectional neighbour when at least one of these holds: - the network type is **point-to-point**, **Point-to-MultiPoint** or a **virtual link**; - this router is the **Designated Router (DR)** or **Backup Designated Router (BDR)**; - the neighbour is the DR or the BDR. If none holds, "the state of the neighbor communication stops at 2-Way". On a broadcast or NBMA network, two routers whose interface state is `DR Other` (neither DR nor BDR) meet none of these conditions, so they remain 2-Way neighbours permanently. The decision is re-taken whenever the DR or BDR changes, through the `AdjOK?` event. ## The arithmetic With **n** routers on a LAN: - A **full mesh** of adjacencies would need **n(n − 1)/2**. - With a DR and a BDR, each of the **n − 2** DR Other routers is adjacent to both, giving **2(n − 2)**, plus **1** adjacency between the DR and the BDR: **2n − 3** in total. - The remaining pairs, **(n − 2)(n − 3)/2** of them, stay at 2-Way. | Routers on the LAN | Full mesh | With DR and BDR | Pairs left at 2-Way | |---|---|---|---| | 4 | 6 | 5 | 1 | | 6 | 15 | 9 | 6 | | 10 | 45 | 17 | 28 | | 20 | 190 | 37 | 153 | The full mesh grows with the square of n; the DR design grows linearly. Each adjacency costs a full database exchange when it forms and a stream of flooded updates and acknowledgements afterwards, so the saving is real on a large segment. ## What a 2-Way neighbour still does - It keeps exchanging **Hellos**, so the inactivity timer and the bidirectional check still run. - It counts as a **candidate in the DR and BDR election**, which considers every neighbour in 2-Way or above. - It is reachable for **data traffic** directly. In the area's map the LAN is a single network node, described by the DR's network-LSA, and the shortest-path computation gives each router a direct next hop to any other router on that LAN. The DR is never a transit hop for data just because it is the DR. - Its LSAs still reach every router, because on a broadcast LAN a DR Other sends updates to the DR and BDR on `224.0.0.6` and the DR passes them on to everyone on `224.0.0.5`; the details belong to the flooding procedure. ## When 2-Way is a real fault 1. **On a point-to-point or Point-to-MultiPoint link.** Neighbours there always become adjacent, so 2-Way means something is blocking the adjacency. 2. **When one of the pair is the DR or BDR.** Every router must be adjacent to both, so a 2-Way state between a DR Other and the DR or BDR means the routers disagree about who holds those roles. 3. **When nobody is eligible.** If every router on the LAN has Router Priority 0, no DR is elected and every pair stops at 2-Way, so no adjacencies form on that LAN at all. ## Why not just build the full mesh - **Database exchanges** would multiply: every new router would run one per existing router. - **Flooding** would multiply: each change would be sent and acknowledged across every adjacency on the same wire. - **The map** would be larger: n routers on one LAN described as point-to-point links would need a link for every pair, where one network-LSA from the DR describes the segment. Seeing a mix of Full and 2-Way on a LAN is therefore the expected, healthy picture.
- Do two OSPF DR Other routers on the same LAN send data traffic to each other through the DR?No. The DR is a control-plane role: it synchronises databases and originates the LAN's network-LSA. In the shortest-path computation the LAN is one network node, so each router gets a direct next hop to any other router on it, and data crosses the LAN in one hop regardless of who is DR.
- When is an OSPF neighbour stuck in 2-Way a real problem?When the link is point-to-point or Point-to-MultiPoint, where neighbours always become adjacent; when one of the two is the DR or BDR, which must be adjacent to everyone; or when every router on the LAN has priority 0, so no DR exists and no adjacencies form at all.
A large meeting with a secretary: everyone gives their updates to the secretary and the deputy, who send out the minutes, instead of every attendee briefing every other attendee one by one. Attendees still talk to each other directly about the actual work.
saying these in an interview costs you the question
- Every pair of OSPF neighbours on a LAN must reach Full or routing is broken.
- OSPF DR Other routers forward data to each other through the DR.
- OSPF 2-Way means the Hellos are getting through in only one direction.
- With a DR elected, OSPF adjacencies on a LAN still grow with the square of the routers.