What's changed: Initial version
3.3Single-area OSPFv2: adjacencies and network types
Covers single-area OSPFv2 (a link-state IGP; AD 110, bandwidth-based cost) through the conditions for forming neighbor adjacencies via Hello (matching area, timers, subnet, MTU), the difference between the point-to-point and broadcast network types, and configuration with router ospf / network / ip ospf verified by show ip ospf neighbor.
OSPF is the one dynamic routing protocol CCNA tests in depth, and in the field the daily reality is troubleshooting "why won't this neighbor reach Full?" This section covers the conditions under which routers exchange Hello packets and form adjacencies, and how behavior (whether a DR/BDR is elected) changes depending on whether the link is point-to-point or broadcast, all from the viewpoint of diagnosing real show ip ospf neighbor output.
3.3.1OSPFv2 basics and single-area configuration
- OSPFv2 is a link-state IGP. Each router advertises its link states (LSAs), so the whole area shares one identical link-state database (LSDB), from which it computes a shortest-path tree via SPF (Dijkstra). Its AD is 110 and its metric is a bandwidth-based cost.
- A single-area design places all routers in area 0 (the backbone). Configure it under
router ospf 1(the process ID is locally significant—it need not match the neighbor's), then eithernetwork 192.168.1.0 0.0.0.255 area 0using a wildcard mask to select participating interfaces, or specify it directly on the interface withip ospf 1 area 0. - The default cost is
cost = reference bandwidth (10^8 = 100 Mbps) / interface bandwidth (bps)(minimum 1). FastEthernet (100 Mbps) is cost 1. But with the default reference bandwidth, GigabitEthernet and faster all round to cost 1, so to distinguish fast links, raise the reference bandwidth withauto-cost reference-bandwidth.
3.3.2Conditions for forming an adjacency via Hello
- Routers discover neighbors by exchanging Hello packets to multicast
224.0.0.5. The relationship progressesDown -> Init -> 2-Way -> Exstart -> Exchange -> Loading -> Full, and Full is the healthy final state meaning "the LSDBs are fully synchronized." - To form an adjacency (reach Full), the Hello/Dead intervals, area ID, subnet (both must be on the same subnet), stub flag, authentication, and MTU must all match. The process ID and router priority need not match (priority is only used for DR election). Any single mismatch stalls the session at 2-Way or Exstart.
3.3.3Network types: point-to-point and broadcast
- Point-to-point is a link with exactly two routers facing each other (a serial link, or a link set to
ip ospf network point-to-point). Since there is always exactly one peer, no DR/BDR is elected and the two form a Full adjacency directly. Setting priority is meaningless here. - Broadcast is the default type on an Ethernet LAN. Since three or more routers can share a segment, a DR/BDR is elected as a representative to prevent an explosion of adjacencies (next section covers the details). DROTHERs staying at 2-Way with each other (not Full) is normal.
Most-tested: forming an adjacency requires matching Hello/Dead timers, area ID, subnet, MTU, authentication, and stub flag (process ID and priority may differ). Point-to-point does not elect a DR/BDR; broadcast does. Also common: cost = 10^8 / bandwidth, and with the default reference bandwidth everything at Gig or faster becomes cost 1. Be able to read show ip ospf neighbor for whether the state is Full or stuck at EXSTART / 2-WAY.
Suppose you directly connected two routers, R1 and R2, over Ethernet and configured OSPF, yet show ip ospf neighbor shows no neighbor at all. The first thing to calmly check is whether the conditions for Hello to line up are met. Running show ip ospf interface on both sides, you find R1's Hello interval is 10 seconds while R2's has been changed to 30. When the Hello/Dead intervals do not match, the routers never even recognize each other as neighbors and stay Down, so you can diagnose that as the cause. If the timers do match but the neighbor is stuck at Init, suspect that Hello is reaching only one direction (the return Hello is being dropped by an ACL or interface fault). Stalling at 2-Way is normal for two DROTHERs on a broadcast link, but staying at 2-Way on a point-to-point link is abnormal. Further, the classic cause of bouncing (flapping) between Exstart/Exchange is an MTU mismatch, which occurs when MTU is changed on only one side. The key here is the diagnostic pattern of narrowing the cause from the symptom (which state it is stuck in): "differing area ID -> Down/Init," "mismatched timers -> no neighbor," "MTU mismatch -> Exstart/Exchange loop." Rather than blindly wiping and re-entering configuration, cross-checking the state in show ip ospf neighbor against the timers, area, network type, and MTU in show ip ospf interface gets you to the cause fastest.
| Item | Point-to-point | Broadcast |
|---|---|---|
| Typical example | Serial, links set to P2P | Ethernet LAN (default) |
| DR/BDR election | Not performed | Performed |
| How adjacencies form | Direct Full with the one peer | Full with DR/BDR; 2-Way among DROTHERs |
| Priority setting | Meaningless | Affects DR election |
Trap: "The OSPF process ID (the 1 in router ospf 1) must match the neighbor's or no adjacency forms" is wrong—the process ID is locally significant and adjacencies form even if it differs. What must match are the Hello/Dead timers, area ID, subnet, MTU, and authentication. Also wrong: "two DROTHERs staying at 2-Way on a broadcast link is a fault"—that is normal; a DROTHER forms Full only with the DR and BDR.
3.3.4Section summary
- OSPFv2 is a link-state IGP (AD 110, cost =
10^8/bandwidth). Single area places all routers in area 0, configured withrouter ospf+network(wildcard mask) - An adjacency (Full) requires matching Hello/Dead timers, area ID, subnet, MTU, authentication, and stub flag; process ID and priority may differ
- Point-to-point forms Full directly without a DR/BDR; broadcast elects a DR/BDR, and two DROTHERs staying at 2-Way is normal
Sign in to track progress — Log in.
Quick check
(just a quick review)Q1. Two directly connected Ethernet routers are configured for OSPF, but `show ip ospf neighbor` shows no neighbor and the state stays Down. `show ip ospf interface` reveals one side's Hello interval is 10 seconds and the other's is 30. What is the most appropriate fix?
Q2. Three routers run OSPF on the same Ethernet segment (a broadcast network). An operator reports that "the neighbor state between the two routers elected as DROTHER stays 2-WAY instead of Full." What is the most appropriate interpretation?
Q3. In an OSPF network left at the default reference bandwidth, links of GigabitEthernet (1 Gbps) and 10-GigabitEthernet (10 Gbps) coexist. What is the most appropriate cause and remedy for "OSPF treating both as the same cost even though the faster 10G link should be preferred"?

