7.1 OSPF Fundamentals and Adjacency Formation
Key Takeaways
OSPFv2 uses IPv4 protocol 89 and a unique Router ID.
Hello and Dead intervals, area settings, addressing, and authentication must be compatible.
Init indicates one-way neighbor visibility; MTU issues are commonly investigated in ExStart/Exchange.
DR election is non-preemptive; priority zero makes a router ineligible.
DROthers normally remain 2-Way with each other on a broadcast LAN.
OSPF's job
Open Shortest Path First version 2 (OSPFv2) is a link-state Interior Gateway Protocol commonly used for IPv4. The current 4A0-100 course teaches OSPF basics. Routers exchange topology information within areas and run Shortest Path First (SPF) to calculate routes from their own perspective.
OSPF is carried directly in IPv4 with protocol number 89. It does not use a TCP or UDP port. Its control packets are distinct from the customer packets whose routes it calculates. A router's Router ID is a unique 32-bit identifier written in dotted-decimal notation; it identifies the router in OSPF, rather than being a destination prefix advertised to customers.
Configure identifiers deliberately in a lab rather than relying on an assumed vendor-independent selection hierarchy. SR OS can derive protocol identifiers from router/system configuration, but protocol-specific overrides and release rules matter. Two adjacent routers must not use the same Router ID.
What information is exchanged?
| OSPF packet | Main purpose |
|---|---|
| Hello | Discover neighbors, verify two-way communication, maintain relationships |
| Database Description | Summarize database contents during synchronization |
| Link State Request | Request particular missing or newer advertisements |
| Link State Update | Carry one or more complete advertisements |
| Link State Acknowledgment | Acknowledge advertisements for reliable flooding |
A Link-State Advertisement (LSA) is a database record; a Link State Update (LSU) is a packet that carries records. An LSU can contain several LSAs. This distinction prevents confusing a packet type with an LSA type.
Topology changes can trigger LSAs, while periodic refresh and reliable flooding maintain state even without a topology change. OSPF does not send the entire route table as its normal topology description.
Hello compatibility
On an ordinary broadcast IPv4 subnet, neighbors need compatible area assignment, subnet configuration, Hello and Dead intervals, authentication, and relevant area capabilities. Their interface addresses should be distinct usable addresses in the same subnet, not identical addresses.
For a teaching example, R1 uses Hello 10 seconds and Dead 40 seconds. R2 must use matching intervals on that link. A mismatch can cause received Hellos to be rejected and prevent a usable neighbor relationship. A local process/instance number is not a field that must match the peer's local number.
The Dead interval determines when lack of valid Hellos causes a neighbor to be declared down. A physical interface failure may be detected sooner. These mechanisms must not be confused with BGP hold timers or LDP discovery timers.
Neighbor states
The common broadcast/point-to-point progression is:
- Down: No recent valid Hello from the neighbor.
- Init: A valid Hello has been received, but it does not list the local Router ID.
- 2-Way: Both routers have seen themselves listed in the other's Hello.
- ExStart: Database-description roles and initial sequence handling are negotiated.
- Exchange: Database descriptions are exchanged.
- Loading: Missing/newer LSAs are requested and received.
- Full: The required database synchronization has completed.
Other network types include an Attempt state; not every adjacency must visibly spend time in every listed state. A pair can finish Exchange without needing additional requested records.
A timer mismatch is not a reliable explanation for a persistent Init relationship: the mismatched Hello may never be accepted. Init more directly indicates one-way neighbor visibility. An MTU mismatch is commonly investigated when synchronization stalls in ExStart or Exchange, because Database Description processing includes MTU information. Correct the link configuration rather than disabling a check without understanding the cause.
DR and BDR on a broadcast LAN
A broadcast segment elects a Designated Router (DR) and Backup Designated Router (BDR) to organize adjacency and flooding. Eligible routers prefer higher interface priority, then higher Router ID when the election's other conditions tie. Priority zero makes a router ineligible for these roles.
The election is non-preemptive. A newly arriving router with higher priority does not simply replace an established DR. If the DR fails, an eligible existing BDR is promoted, and a replacement BDR can be selected.
Routers that are neither DR nor BDR are DROthers. They normally form Full adjacencies with the DR/BDR and remain 2-Way with each other. A healthy DROther pair in 2-Way is therefore not necessarily a fault. Point-to-point interfaces do not need DR/BDR election.
For IPv4 multicast, 224.0.0.5 identifies AllSPFRouters and 224.0.0.6 identifies AllDRouters. Exact transmission behavior depends on packet and interface type; do not assume every OSPF packet goes to one group.
Calculate a path and configure the link
OSPF adds configured outgoing costs. If R1–R2 costs 10 and R2–R4 costs 20, that path costs 30. If R1–R3 costs 5 and R3–R4 costs 15, that alternative costs 20 and wins among otherwise comparable routes.
For MD-CLI, assume Base interfaces system and to-R2 already exist with correct addressing, and the connected port is operational:
configure private
/configure router "Base" router-id 10.10.10.1
/configure router "Base" ospf 0 admin-state enable
/configure router "Base" ospf 0 area 0.0.0.0 interface "system"
/configure router "Base" ospf 0 area 0.0.0.0 interface "to-R2" interface-type point-to-point
/configure router "Base" ospf 0 area 0.0.0.0 interface "to-R2" admin-state enable
compare
validate
commit
This is a configuration fragment, not a completed lab result. The peer needs compatible configuration. Inspect /show router ospf neighbor, /show router ospf interface, /show router ospf database, and the selected route table. A Full neighbor does not prove the destination was advertised or that policy and route selection installed it.
Primary reference
OSPFv2 specification and Nokia SR OS documentation, checked October 20, 2026.
Two routers on an OSPF broadcast link use Hello/Dead intervals 10/40 and 5/20 seconds. What does this mismatch normally prevent?
Different local instance numbers
A working physical Ethernet link in every case
Acceptance of compatible Hellos and formation of a usable OSPF relationship
Every non-OSPF IP packet from traversing the link
R2 is an established OSPF DR. R3 joins with higher interface priority. What happens under the normal non-preemptive election?
R3 immediately replaces R2
R2 remains DR; a higher-priority arrival does not preempt the incumbent
All neighbors must reset to Down
The AS number decides the winner
During the OSPF neighbor adjacency process, in which specific state do two adjacent routers negotiate the Master/Slave relationship and establish the initial Database Description (DBD) sequence number?
Init state
2-Way state
Exchange state
ExStart state
Sections you finish are checked off in the contents.