Infrastructure · Topic 5 of 13
Comparing EIGRP and OSPF Concepts
Compare EIGRP and OSPF: advanced distance vector versus link state, metrics, load balancing, path selection, operation and the OSPF area types.
- 6 min
- Includes a diagram
- EIGRP is advanced distance vector and uses DUAL. OSPF is link state and uses SPF.
- EIGRP is IP protocol 88, and OSPF is IP protocol 89.
- Administrative distance is 90 for internal EIGRP, 170 for external EIGRP and 110 for OSPF.
What it is
EIGRP and OSPF are both interior routing protocols, but they work in different ways.
EIGRP is an advanced distance vector protocol. It shares its routes with its neighbours, and it uses an algorithm called DUAL to keep paths loop free.
OSPF is a link state protocol. Every router in an area builds the same map of the network and runs the shortest path first (SPF) algorithm on it.
How it works
The differences show up in metrics, path selection, operation and design.
Side by side
| Feature | EIGRP | OSPF |
|---|---|---|
| Type | Advanced distance vector | Link state |
| Standard | Cisco origin, now documented openly | Open standard, IETF |
| Algorithm | DUAL | Dijkstra SPF |
| IP protocol | 88 | 89 |
| Multicast address | 224.0.0.10 | 224.0.0.5 and 224.0.0.6 |
| Administrative distance | 90 internal, 170 external | 110 |
| Hierarchy | None, uses summarisation and stubs | Areas, with area 0 as the backbone |
| Unequal cost load balancing | Yes, with variance | No |
Metrics
EIGRP uses a composite metric. By default it uses bandwidth and delay, taken from the slowest link on the path and the sum of delays.
Other inputs, such as reliability and load, are off by default. Newer wide metrics scale better for very fast links.
OSPF uses cost. The cost of an interface is the reference bandwidth divided by the interface bandwidth. The default reference bandwidth is 100 Mbps, which gives a cost of 1 to every link of 100 Mbps and above.
You can raise it so that fast links are told apart, as in this IOS XE example.
R1(config)# router ospf 1
R1(config-router)# auto-cost reference-bandwidth 10000
Use the same reference bandwidth on every router in the OSPF domain.
Path selection
EIGRP keeps a topology table. The best path is the successor, which has the lowest feasible distance. A feasible successor is a backup path that meets the feasibility condition, which says its reported distance must be lower than the current feasible distance of the successor.
With a feasible successor, the router switches over at once without querying.
OSPF stores the link state database. Each router runs SPF on it and chooses the path with the lowest total cost. If there are equal cost paths, it can use them together.
Load balancing
Both protocols can balance across equal cost paths. The number of paths is limited by maximum-paths.
EIGRP can also use unequal cost paths. The variance command sets a multiplier. A feasible successor with a metric within that multiple of the best metric is used as well, and traffic is shared in proportion.
R1(config)# router eigrp 100
R1(config-router)# variance 2
Path operations
- Neighbours: both protocols use hello packets to find and keep neighbours. OSPF routers must agree on parameters such as area, hello and dead timers, and authentication. EIGRP neighbours must agree on the autonomous system number and the K values.
- Updates: EIGRP sends partial updates only when something changes. OSPF floods link state advertisements (LSAs) when a link changes.
- Reliability: EIGRP uses its own reliable transport. OSPF acknowledges its LSAs.
OSPF area types
Areas limit how far routing detail spreads. All other areas connect to the backbone, area 0.
| Area type | Blocks | Notes |
|---|---|---|
| Normal | Nothing | Accepts all LSA types |
| Stub | External routes (type 5) | The ABR adds a default route |
| Totally stubby | External and inter area routes | Only a default route comes in. Cisco specific |
| NSSA | Type 5, but allows type 7 | Lets an ASBR inside a stub like area |
| Totally NSSA | Inter area routes, with type 7 allowed | A default route is injected |
LSA types to know: type 1 is the router LSA, type 2 the network LSA, type 3 the summary LSA, type 4 the ASBR summary, type 5 the external LSA and type 7 the NSSA external LSA.
EIGRP has no areas. It controls the spread of routes through summarisation and through stub routers, which tell neighbours not to query them.
Which to choose
EIGRP converges quickly and is simple to configure, and it can use unequal cost paths. OSPF is an open standard that works with many vendors, and its areas help in large networks.
What to remember for the exam
Eight facts cover most questions on this topic.
- EIGRP is advanced distance vector and uses DUAL. OSPF is link state and uses SPF.
- EIGRP is IP protocol 88, and OSPF is IP protocol 89.
- Administrative distance is 90 for internal EIGRP, 170 for external EIGRP and 110 for OSPF.
- The EIGRP metric uses bandwidth and delay by default. OSPF uses cost based on bandwidth.
- EIGRP supports unequal cost load balancing with
variance. OSPF does not. - A feasible successor is a loop free backup that meets the feasibility condition.
- OSPF uses areas, and all areas connect to area 0.
- Stub areas block type 5 LSAs, and NSSA allows type 7.
When a question asks about a backup that takes over without a query, it is describing an EIGRP feasible successor.
Common mistakes
These four mistakes appear often.
Saying EIGRP is a link state protocol. It shares routes with neighbours, so it is advanced distance vector.
Leaving the OSPF reference bandwidth at the default on fast networks. Links of 100 Mbps and faster then all get the same cost.
Expecting OSPF to use unequal cost paths. It balances only across equal costs.
Forgetting that type 7 LSAs convert at the ABR. An NSSA ABR translates them to type 5 for the rest of the network.
Mismatched OSPF hello timers, dead timers, area IDs or stub flags will stop a neighbour relationship forming.
Check yourself
Work through these three questions.
What is the administrative distance of OSPF and of internal EIGRP?
OSPF is 110, and internal EIGRP is 90.
Which protocol can balance traffic across unequal cost paths, and how?
EIGRP can, using the
variancecommand with feasible successors.Which OSPF area type allows an ASBR but blocks type 5 LSAs?
A not so stubby area (NSSA) lets an ASBR inject type 7 LSAs while blocking type 5.
Topic 5 of 13 in Infrastructure
Test yourself on Infrastructure
The full Cisco CCNP 350-401 ENCOR question bank has 854 questions, with timed practice exams and an explanation for every answer.
This study guide is independent and is not affiliated with, endorsed by, or sponsored by Cisco. Vendor names, certification names and exam codes are trademarks of their respective owners and are used for identification only.