Skip to content
Study CCNP

Compare

3.2.a Compare routing concepts of EIGRP and OSPF (advanced distance vector vs. link state, load balancing, path selection, path operations, metrics, and area types)

4 min read ENCOR 350-401 v1.2

Aligned to Cisco's 350-401 ENCOR v1.2 exam topics.

On this page

EIGRP and OSPF both help routers learn routes dynamically. The difference is how they think.

EIGRP behaves like an advanced distance-vector protocol. A router asks, “What distance does my neighbor report, and what is my total distance through that neighbor?”

OSPF behaves like a link-state protocol. A router asks, “What does the topology look like, and what is the shortest path through that topology?”

That difference explains most exam questions.

High-level comparison

TopicEIGRPOSPF
TypeAdvanced distance vectorLink state
AlgorithmDUALSPF / Dijkstra
Neighbor scopeDirect neighbors exchange route informationRouters flood LSAs inside areas
MetricComposite metric based mainly on bandwidth and delay by defaultCost, usually based on interface bandwidth
Topology viewBest routes and feasible backup routesLink-state database for the area
Design unitAutonomous system with optional summarization/stubsAreas, with backbone area 0
Load balancingEqual-cost and unequal-cost with varianceEqual-cost only by default

EIGRP path selection

EIGRP keeps three important values straight:

  • Feasible Distance (FD): your total metric to the destination through a neighbor.
  • Reported Distance (RD) or Advertised Distance: the neighbor’s metric to the destination.
  • Feasibility Condition: a neighbor can be a feasible successor if its RD is less than your current FD.

The feasibility condition prevents loops. It is also why the “second best” route may not be immediately usable as a backup.

Destination prefix X
N1 · current successor
N2 · alternate neighbor
R1 feasible distance FD via N1
Feasible successor · fast switchover if N1 fails
Not feasible · N2 cannot be backup

Basic named-mode EIGRP example:

router eigrp CAMPUS
 address-family ipv4 unicast autonomous-system 100
  network 10.0.0.0 0.255.255.255
  af-interface default
   passive-interface
  exit-af-interface
  af-interface GigabitEthernet0/0
   no passive-interface
  exit-af-interface
 exit-address-family

Verify:

show ip eigrp neighbors
show ip eigrp topology
show ip route eigrp
show ip protocols

OSPF path selection

OSPF routers build a link-state database and run SPF to choose shortest paths. OSPF cost is normally based on interface bandwidth.

Basic OSPFv2 example:

router ospf 10
 router-id 1.1.1.1
 passive-interface default
 no passive-interface GigabitEthernet0/0
 network 10.0.0.0 0.0.0.255 area 0

Verify:

show ip ospf neighbor
show ip ospf database
show ip route ospf
show ip ospf interface brief

Metrics

EIGRP metric

Classic EIGRP uses bandwidth and delay by default. Reliability and load exist in the formula but are not used by default unless K-values are changed.

The exam-level idea: EIGRP prefers the path with the lowest composite metric. Bandwidth is based on the slowest link in the path; delay accumulates along the path.

OSPF metric

OSPF cost is interface-based. Lower cost wins. The common formula is:

cost = reference bandwidth / interface bandwidth

On modern networks, set the reference bandwidth high enough for current link speeds:

router ospf 10
 auto-cost reference-bandwidth 100000

Use the same reference bandwidth everywhere in the OSPF domain. If routers disagree, path selection becomes confusing.

Load balancing

EIGRP can do equal-cost load balancing and unequal-cost load balancing.

router eigrp CAMPUS
 address-family ipv4 unicast autonomous-system 100
  variance 2
  maximum-paths 4
 exit-address-family

OSPF normally installs equal-cost paths only. If two OSPF paths have the same total cost, both can be installed.

router ospf 10
 maximum-paths 4

Area types and design

OSPF uses areas. Area 0 is the backbone. Non-backbone areas must connect to area 0 directly or through a virtual link in special cases.

Area types you should recognize:

Area typePurpose
NormalAllows intra-area, inter-area, and external routes.
StubBlocks external LSAs and uses a default route.
Totally stubbyBlocks external and most inter-area detail; uses a default route.
NSSAAllows limited external injection from inside a stub-like area.

EIGRP does not use OSPF-style areas. It can use summarization, stub routers, and query boundaries to make operation cleaner.

Path operations

When a link fails:

  • EIGRP can use a feasible successor immediately if one exists. If not, it queries neighbors.
  • OSPF floods the topology change and routers run SPF again.

This matters for troubleshooting. An EIGRP route may disappear while the router queries. OSPF may have a neighbor adjacency that is fine, but the LSDB or area design causes the route you expect not to appear.

Lab: Compare route choice

Topology

R1
R2
R3
R4

R1 has two paths to R4: through R2 and through R3.

Task 1: Run OSPF

Configure OSPF area 0 on all links:

router ospf 10
 router-id 1.1.1.1
 network 10.0.0.0 0.255.255.255 area 0

Verify on R1:

show ip route ospf
show ip ospf neighbor
show ip ospf interface brief

Change interface cost on one path:

interface gi0/0
 ip ospf cost 50

Watch the route change.

Task 2: Run EIGRP

Remove OSPF or use a separate lab. Configure EIGRP:

router eigrp CAMPUS
 address-family ipv4 unicast autonomous-system 100
  network 10.0.0.0 0.255.255.255
 exit-address-family

Verify:

show ip eigrp topology
show ip route eigrp

If the backup path is a feasible successor, shut the primary link and watch EIGRP install the backup quickly.

Exam traps

  • EIGRP’s feasible successor is not just the second-lowest metric route. It must pass the feasibility condition.
  • OSPF neighbors can be full, but route filtering, summarization, area type, or cost can still change what appears in the routing table.
  • OSPF cost depends on reference bandwidth. Bad reference bandwidth can make high-speed links look equal.
  • EIGRP supports unequal-cost load balancing with variance; OSPF does not in normal operation.
  • OSPF area 0 is the backbone. Area design matters.

Quick checklist

  1. Is this a neighbor problem or a path-selection problem?
  2. For EIGRP, what are FD, RD, successor, and feasible successor?
  3. For OSPF, what is the area, cost, and LSDB view?
  4. Is summarization or filtering hiding a route?
  5. Is equal-cost or unequal-cost load balancing expected?