On the CCNA 200-301 exam, you must understand the differences between OSPF and EIGRP to choose the right routing protocol for a given scenario. Both are interior gateway protocols (IGPs) but they differ fundamentally in algorithm, metric calculation, convergence speed, and operational complexity. This chapter provides a side-by-side comparison covering how each protocol works, key configuration and verification commands, and common exam traps. Exam objective: 3.4
Jump to a section
Imagine you are a delivery driver in a large city. OSPF is like using a GPS navigation system: every driver has a complete map of all streets, traffic conditions, and intersections. When a road closes, the GPS recalculates the entire route from scratch using the latest map data (link-state database). EIGRP, on the other hand, is like relying on local landmarks and word-of-mouth directions. Each driver knows only the roads they use regularly and shares that knowledge with nearby drivers. If a road closes, they ask their neighbors for alternative routes, relying on stored backup routes (feasible successors). The GPS (OSPF) gives the shortest path based on cost (distance), while the landmark method (EIGRP) uses a composite metric of bandwidth and delay. The GPS requires more memory and processing (CPU) to store the full map, but it converges quickly by running the SPF algorithm. The landmark method uses less memory but may have to query neighbors if no backup route exists, causing slower convergence. In networking, OSPF is open standard and works with any vendor, while EIGRP is Cisco proprietary (though now partially open). Understanding this analogy helps you remember that OSPF uses link-state and SPF, while EIGRP uses distance vector with DUAL.
What They Are
OSPF (Open Shortest Path First) is a link-state routing protocol that uses the Dijkstra SPF algorithm to compute the shortest path tree to all destinations. It builds a complete map of the network (link-state database) by exchanging LSAs. EIGRP (Enhanced Interior Gateway Routing Protocol) is an advanced distance-vector protocol that uses the Diffusing Update Algorithm (DUAL) for loop-free path selection. It does not maintain a full network map but stores routing information in tables: topology table, routing table, and neighbor table.
How They Work Step by Step
OSPF Operation: - Routers discover neighbors by sending Hello packets on interfaces. Hello interval is 10 seconds (broadcast/P2P) or 30 seconds (NBMA). Dead interval is 40 seconds (broadcast/P2P) or 120 seconds (NBMA). - Once a neighbor relationship is formed (2-Way state), routers exchange LSAs to build identical link-state databases (Full state). - Each router runs SPF to calculate shortest paths. SPF is triggered by any change in the LSDB. - OSPF uses cost as metric (cost = reference bandwidth / interface bandwidth, default reference = 100 Mbps). - OSPF supports hierarchical design with areas (backbone area 0 required).
EIGRP Operation: - Routers discover neighbors by sending Hello packets every 5 seconds (high-speed links) or 60 seconds (low-speed). Hold time is 15 seconds (3x Hello). - After neighbor adjacency, routers exchange full routing tables (initial update) and then only incremental updates. - DUAL uses the topology table to select best path (successor) and feasible successor (backup) if available. The feasible successor must satisfy the feasibility condition: reported distance < feasible distance. - Metric is composite: metric = [K1 * bandwidth + (K2 * bandwidth)/(256 - load) + K3 * delay] * 256. Default K values: K1=1, K2=0, K3=1, K4=0, K5=0. So default metric = (bandwidth + delay) * 256. - EIGRP is classless, supports VLSM, manual summarization, and route redistribution.
Key States, Timers, and Defaults
OSPF States: - Down -> Init -> 2-Way -> ExStart -> Exchange -> Loading -> Full - Important: 2-Way means neighbors see each other; Full means databases synchronized. - DR/BDR election on broadcast networks: highest priority (default 1), then highest Router ID.
EIGRP States: - Neighbor states: Down -> Init -> Received Init -> Established - Route states in topology table: Passive (stable), Active (recomputing, sending queries). - DUAL finite state machine.
Timers: - OSPF Hello: 10s (broadcast/P2P), 30s (NBMA). Dead: 40s/120s. - EIGRP Hello: 5s (high-speed), 60s (low-speed). Hold: 15s/180s.
IOS CLI Verification Commands
OSPF Verification:
show ip ospf neighbor
show ip ospf interface
show ip ospf database
show ip route ospfEIGRP Verification:
show ip eigrp neighbors
show ip eigrp topology
show ip route eigrp
show ip eigrp interfacesInteraction with Related Protocols
Both OSPF and EIGRP can be redistributed into each other or into BGP. OSPF uses area 0 as backbone; inter-area routes are summarized. EIGRP uses autonomous system numbers; routes are tagged with administrative distance (OSPF: 110, EIGRP: 90 internal, 170 external). Both support authentication (OSPF: MD5, SHA; EIGRP: MD5). OSPF is open standard; EIGRP was Cisco proprietary but now published as open standard (RFC 7868).
Configure OSPF on R1
Enter global configuration mode on R1. Use `router ospf 1` to start OSPF process 1. Then use `network 10.0.0.0 0.255.255.255 area 0` to advertise interfaces in the 10.0.0.0/8 network into area 0. Alternatively, use `interface GigabitEthernet0/0` then `ip ospf 1 area 0` for interface-specific configuration. The wildcard mask is the inverse of the subnet mask. OSPF process ID is locally significant.
Configure EIGRP on R1
Use `router eigrp 100` to start EIGRP autonomous system 100. Then use `network 10.0.0.0 0.255.255.255` to enable EIGRP on interfaces in that range. Unlike OSPF, EIGRP does not require an area. Optionally, use `no auto-summary` to disable automatic summarization at classful boundaries. The AS number must match on all routers.
Verify OSPF neighbor adjacency
Use `show ip ospf neighbor` to see neighbor state. Expected output shows neighbor Router ID, interface, state (FULL/DR), and dead time. For example: `Neighbor 2.2.2.2, interface GigabitEthernet0/0, state FULL, Dead time 00:00:34`. If state is not FULL, troubleshoot mismatched parameters (area, timers, authentication).
Verify EIGRP neighbor adjacency
Use `show ip eigrp neighbors` to see neighbor table. Output shows neighbor IP, interface, hold time, uptime, sequence number, and SRTT. Example: `H 10.0.0.2, Gi0/0, hold 13, uptime 00:10:00, q 0, srtt 100`. If no neighbors appear, check AS number mismatch, ACL blocking, or interface shutdown.
Compare routing tables
Use `show ip route ospf` and `show ip route eigrp` to see routes learned by each protocol. OSPF routes are marked with code 'O' (intra-area), 'O IA' (inter-area), etc. EIGRP routes are marked with 'D'. Note the administrative distance: OSPF is 110, EIGRP internal is 90, so EIGRP routes are preferred if both learn the same prefix.
Troubleshoot OSPF vs EIGRP metric issues
If a route is not preferred as expected, check metrics. For OSPF, use `show ip ospf interface` to see cost. For EIGRP, use `show ip eigrp topology` to see metric components (bandwidth, delay). Adjust OSPF cost with `ip ospf cost` on interface. For EIGRP, modify delay with `delay` command on interface. Remember that EIGRP metric is computed from bandwidth and delay by default.
In enterprise networks, OSPF is widely used in multi-vendor environments because it is an open standard. For example, a company with Cisco, Juniper, and HP switches would choose OSPF for interoperability. OSPF's hierarchical design with areas helps scale large networks by limiting LSDB size and reducing SPF computation. A typical deployment might have a backbone area 0 with multiple non-backbone areas (e.g., area 1 for campus, area 2 for data center). Network engineers tune OSPF cost by adjusting interface bandwidth or using the ip ospf cost command to influence path selection.
EIGRP, being Cisco proprietary (though now open), is often used in all-Cisco environments where fast convergence and simple configuration are desired. For instance, a branch office with a single Cisco router connecting to headquarters might use EIGRP for its quick neighbor discovery and low overhead. EIGRP's support for unequal-cost load balancing (variance command) is a unique feature that allows traffic distribution across paths with different metrics, which is useful when links have different speeds.
A common misconfiguration is mismatched OSPF area IDs or EIGRP AS numbers, preventing neighbor formation. Also, forgetting to disable auto-summary in EIGRP can cause suboptimal routing. In production, OSPF stub areas and EIGRP stub routing are used to reduce routing table size and improve stability. For example, an OSPF totally stubby area blocks type 3, 4, and 5 LSAs, while EIGRP stub router prevents it from sending queries, reducing convergence time on the edge.
The CCNA 200-301 exam tests your ability to compare OSPF and EIGRP in terms of algorithm, metric, administrative distance, and convergence. Objective 3.4 requires you to "compare and contrast interior gateway protocols." Expect questions that present a scenario (e.g., "Which protocol uses the Dijkstra algorithm?") or ask you to identify characteristics from a list.
Common wrong answers include: 1. Choosing OSPF as distance-vector: Candidates confuse link-state and distance-vector. Remember: OSPF = link-state = SPF; EIGRP = advanced distance-vector = DUAL. 2. Thinking EIGRP uses hop count as metric: EIGRP defaults to bandwidth and delay. Hop count is not a factor in metric calculation; it is only used to prevent loops (max hop count 255). 3. Assuming OSPF and EIGRP have the same AD: OSPF AD is 110; EIGRP internal AD is 90. So EIGRP routes are preferred over OSPF. 4. Forgetting that EIGRP supports unequal-cost load balancing: OSPF only supports equal-cost load balancing.
Specific values to memorize: OSPF Hello/Dead timers (10/40 for broadcast), EIGRP Hello/Hold (5/15 for high-speed). OSPF cost formula (reference bandwidth 100 Mbps). EIGRP metric formula (bandwidth + delay) * 256.
For scenario questions, use elimination: If the question mentions "link-state database" or "SPF", it's OSPF. If it mentions "feasible successor" or "DUAL", it's EIGRP. If the scenario requires fast convergence and all-Cisco, EIGRP may be better. If multi-vendor, OSPF is the only choice among these two.
OSPF is a link-state protocol using the Dijkstra SPF algorithm; EIGRP is an advanced distance-vector protocol using DUAL.
OSPF uses cost as metric (reference bandwidth / interface bandwidth); EIGRP uses composite metric (bandwidth and delay by default).
OSPF administrative distance is 110; EIGRP internal AD is 90, external AD is 170.
OSPF requires area 0 as backbone; EIGRP uses autonomous system numbers.
OSPF Hello timer default 10 seconds on broadcast/P2P; Dead timer 40 seconds. EIGRP Hello timer default 5 seconds; Hold timer 15 seconds.
EIGRP supports unequal-cost load balancing via the variance command; OSPF only equal-cost.
OSPF is open standard; EIGRP was Cisco proprietary but now open (RFC 7868).
These come up on the exam all the time. Here's how to tell them apart.
OSPF
Link-state protocol using SPF algorithm
Metric: cost (bandwidth-based)
AD: 110
Hierarchical: areas required (backbone area 0)
Open standard (RFC 2328)
EIGRP
Advanced distance-vector using DUAL
Metric: composite (bandwidth, delay, load, reliability)
AD: 90 internal, 170 external
Flat or hierarchical with AS numbers
Cisco proprietary (now open RFC 7868)
Mistake
EIGRP is a link-state protocol because it has a topology table.
Correct
EIGRP is an advanced distance-vector protocol. The topology table stores routes and metrics, but it does not contain a full network map like OSPF's LSDB.
Candidates see the topology table and think it's like OSPF's database, but EIGRP still relies on distance-vector principles with DUAL.
Mistake
OSPF uses hop count as its metric.
Correct
OSPF uses cost based on interface bandwidth. Hop count is not part of the metric; OSPF can have paths with more hops but lower cost.
RIP uses hop count, so candidates confuse IGPs.
Mistake
EIGRP automatically summarizes at classful boundaries by default.
Correct
In modern IOS versions (15.x+), auto-summary is disabled by default. Older versions had it enabled. The CCNA expects you to know it can be disabled with 'no auto-summary'.
Many study materials still mention auto-summary as default, but Cisco changed it.
Mistake
OSPF and EIGRP can form neighbor relationships across different autonomous systems or areas.
Correct
OSPF requires same area ID and process ID (though process ID is local). EIGRP requires same AS number. They cannot form neighbors if these don't match.
Candidates think process ID or AS number is like a process ID that can differ, but they must match.
Reveal each answer, then mark whether you got it right. Score 60%+ to unlock the next chapter.
OSPF uses the Dijkstra Shortest Path First (SPF) algorithm, which builds a complete link-state database and computes the shortest path tree. EIGRP uses the Diffusing Update Algorithm (DUAL), which is a loop-free distance-vector algorithm that uses feasible successors for backup paths. OSPF is link-state; EIGRP is advanced distance-vector.
EIGRP internal routes have an AD of 90, while OSPF has AD 110. So EIGRP routes are preferred over OSPF routes when both protocols learn the same prefix. EIGRP external routes have AD 170, which is higher than OSPF.
Yes, they can be used together through route redistribution. For example, a router can run both OSPF and EIGRP and redistribute routes from one protocol into the other. However, careful configuration is needed to avoid routing loops and suboptimal routing.
OSPF: Hello 10 seconds, Dead 40 seconds on broadcast and point-to-point links; on NBMA (Frame Relay), Hello 30 seconds, Dead 120 seconds. EIGRP: Hello 5 seconds, Hold 15 seconds on high-speed links (>= T1); on low-speed links (< T1), Hello 60 seconds, Hold 180 seconds.
Use 'show ip ospf neighbor' to list neighbors, their state (FULL, 2-Way, etc.), and dead time. For example, 'show ip ospf neighbor' output: Neighbor 2.2.2.2, interface GigabitEthernet0/0, state FULL, Dead time 00:00:34. If state is not FULL, check area, timers, authentication, and network type.
Use 'show ip eigrp neighbors' to see neighbor table. Key fields: neighbor IP, interface, hold time (should be decreasing), uptime, sequence number. If no neighbors, check AS number, K values, and interface status.
Default metric = (bandwidth + delay) * 256, where bandwidth = (10^7 / minimum bandwidth in kbps) * 256, and delay = sum of delays in tens of microseconds * 256. The full formula includes K values: metric = [K1 * bandwidth + (K2 * bandwidth)/(256 - load) + K3 * delay] * 256. Default K1=1, K3=1, others 0.
You've just covered OSPF vs EIGRP: Side-by-Side Comparison — now see how well it sticks with free CCNA 200-301 practice questions. Full explanations included, no account needed.
Done with this chapter?