EIGRP vs OSPF: Differences & Similarities

The purpose of this post is to compare both EIGRP vs OSPF version 2 to understand their similarities and differences.

Enhanced Interior Gateway Protocol (EIGRP) and Open Shortest Path First (OSPF) are interior gateway protocols (IGPs) that help routers to learn how to reach IP subnets or routes; choose the best route to reach each subnet based on a metric, and ultimately converge to choose new best routes when the network changes.

Although EIGRP uses distance vector logic, and OSPF uses link state logic, both EIGRP and OSPF routing protocols have three major similarities:

  1. EIGRP and OSPF use a hello protocol that assists in:
    1. Finding neighboring routers;
    2. Keeping an updated list of working neighbors;
    3. Monitoring ongoing hello messages to ensure the neighbor is still reachable; and
    4. Detecting when the link to a neighbor has failed.
  2. EIGRP and OSPF exchange topology information and populate their locally stored topology database. The topology database describes details about the network.
  3. EIGRP and OSPF process their topology databases to choose the best route (lowest metric route) to reach each subnet. Those best routes are then presented to the routing table.

Comparing EIGRP vs OSPF allows you to see the different conventions and logic. Their topology databases differ significantly, with EIGRP collecting just enough to make choices about successor and feasible successor routes, and with OSPF collecting details about the links that each OSPF router advertises. The method of processing the database, which then determines the best route for each subnet, differs significantly as well.

These are basically the similarities between EIGRP and OSPF. Now, let’s take a look at some of their differences.


EIGRP vs OSPF: Routing Logic

In this section, you’ll be presented with an EIGRP vs OSPF comparison to understand how those two routing protocols see the network, and how they execute routing updates.


EIGRP is a distance vector protocol that acts like a link-state protocol. The name distance vector is derived from the fact that routes are advertised as vectors (distance, direction). A distance vector protocol measures how many hops away (routers) and in what direction (next-hop router) a destination subnet can be found.

A distance vector protocol passes its complete routing table (everything it knows) to directly connected neighbors, who then combine the received subnets with their own routing table to then pass on their updated routing table to other neighbors.

Distance vector protocols are also called routing by rumor because a router receiving updates from a neighbor blindly believes in the updates without verifying for itself whether received routes are actually accurate.

Now, although EIGRP updates are still vectors of distances, EIGRP offers enhancements that give EIGRP its vast popularity on Cisco networks. EIGRP’s distance vector updates sent directly to connected neighbors are nonperiodic, partial, and bounded.

  • Nonperiodic means that updates are not sent every set timeframe. Updates are sent only when a metric or topology change happens.
  • Partial means that updates include only routes that have changes and not the entire routing table.
  • Bounded means that updates are sent to affected routers.

For these reasons, EIGRP consumes much less bandwidth than the typical distance vector protocol.


OSPF is link-state protocol. But, what’s “link state”? Think of a link as an interface on a router. The state of the link is a description of that interface and of its relationship to its neighboring routers. A description of the interface would include, for instance, the IP address of the interface, the mask, the type of network it is connected to, the routers connected to that network, and so on. The collection of all these link states would form a link-state database.

Link-state protocols announce information only about their directly connected links, and they share the information with all routers in their routing domain or area.

Here’s an example of a link state message, more specifically a Router Link State Advertisement, or Router LSA. This type of LSA is sent by each router to the rest of the routers within the area to describe the router’s interfaces.

This OSPF router is saying that it has 2 links:

  • One link is a stub network (no OSPF neighbors) with an IP of, a mask of, and a metric of 1
  • Another link that’s a transit network (potentially ethernet with a neighbor) with an IP of and a metric of 1
R1#show ip ospf database router      

            OSPF Router with ID ( (Process ID 10)

                Router Link States (Area 0)

  LS age: 38
  Options: (No TOS-capability, DC)
  LS Type: Router Links
  Link State ID:
  Advertising Router:
  LS Seq Number: 80000006
  Checksum: 0x275
  Length: 48
  Number of Links: 2

    Link connected to: a Stub Network
     (Link ID) Network/subnet number:
     (Link Data) Network Mask:
      Number of MTID metrics: 0
       TOS 0 Metrics: 1

    Link connected to: a Transit Network
     (Link ID) Designated Router address:
     (Link Data) Router Interface address:
      Number of MTID metrics: 0
       TOS 0 Metrics: 1


Unlike the routing-by-rumor approach of distance vector, link state routers have firsthand information from all their peer routers. Each router originates information about itself, meaning its directly connected links, and the state of those links (hence the name). This information is passed around from router to router, each router making a copy of it, but never changing it. The objective is that every router has identical information about the internetwork, and each router will independently calculate its own best paths from each router’s perspective.


EIGRP vs OSPF: Request For Comments (RFCs)

Let’s take a look at what RFCs describe EIGRP and OSPF.


EIGRP is a Cisco proprietary routing protocol described on RFC 7868. Published in 2013, RFC 7868, provides a basic description of EIGRP’s design and architecture. This RFC allows Cisco to retain control of EIGRP and customer experience while opening it to other vendors to promote interoperability.


OSPF version 1 is described in RFC 1131. The current version, OSPF version 2, is used for IPv4 and is specified in RFCs 1247 and 2328. OSPF version 3, used in IPv6 networks, is specified in RFC 5340.


EIGRP vs OSPF: Main Features & Benefits

This section covers EIGRP’s and OSPF’s most important features and benefits.


Let’s talk about EIGRP’s main features and benefits.

EIGRP Main Features & Benefits

EIGRP offers Fast Convergence. When a router runs EIGRP, it maintains the routing information received from its neighbors in the topology table so that it can quickly converge to alternate routes. If no backup route exists, EIGRP queries its neighbors to discover an alternate route. These queries propagate until an alternate route is found.

EIGRP does not send periodic updates; instead, it sends partial, triggered updates. These updates are sent only when the path or the metric changes for a route and contain information about the changed routes only. Propagation of partial updates is automatically bounded so that only relevant routers that need the information receive the updates. Because of these two capabilities, EIGRP consumes significantly less bandwidth.

Classic EIGRP represents its sophisticated metric values in a 32-bit format to provide enough granularity in traditional networks. Since IOS 15, Cisco has introduced a new method of configuration called named EIGRP that supports a 64-bit metric format. This new metric format is also referred to as EIGRP-Wide metrics and allows for the use of interfaces with bandwidths above 1 gigabit and up to 4.2 terabits.

EIGRP supports unequal metric load balancing, a feature that allows routers to distribute traffic flows more efficiently over links with different metric values.

EIGRP supports Variable Length Subnet Masks (VLSM) making EIGRP a classless routing protocol. As a result, EIGRP advertises a subnet mask for each destination network. EIGRP can also be configured to manually summarize any bit boundary on the interface on which it is configured.

EIGRP supports multiple network-layer protocols, such as IPv4 and IPv6, by using protocol-dependent modules. These modules are responsible for specific requirements that are specific to the network layer protocol.

EIGRP does not require special configuration to work across any Layer 2 protocols. EIGRP operates effectively in both LAN and WAN environments such as dedicated point-to-point links and Nonbroadcast Multiaccess (NBMA) topologies. When neighbor adjacencies form across WAN links, EIGRP accommodates differences in media types and speeds, and they can also be configured to limit the amount of bandwidth that the protocol uses on WAN links.

By default, EIGRP uses the minimum bandwidth on the path to a destination network and the total delay to compute routing metrics. Other factors such as the interface load and reliability can be turned on but it’s not recommended.

EIGRP supports neighbor authentication via Message Digest 5 (MD5).


OSPF is highly scalable because it supports breaking down the network into areas. All areas must be connected to Area 0, also called the backbone area. If an OSPF router has all of its interfaces in one area, that router is considered an intra-area router. If an OSPF router has one or more interfaces in Area 0 and one or more interfaces in Non-Area 0 areas, that router is considered an inter-area router or Area Border Router (ABR). OSPF routers that inject routes into the OSPF domain from other routing protocols via redistribution are called Autonomous System Border Routers (ASBRs).

OSPF Areas with ABR and ASBR Routers

All routers within an OSPF area must have identical and synchronized link-state information in their OSPF databases. When an OSPF router discovers a new neighbor, it sends a full update with all known link-state information. Once an OSPF network is in a converged state and a new link comes up or an existing link becomes unavailable, an OSPF router sends only a partial update to all its neighbors. This update is then flooded to all OSPF routers within an area.

OSPF uses a metric based on the cumulative costs of all outgoing interfaces from source to destination. The interface cost is inversely proportional to the interface bandwidth and can be set up manually.

OSPF is a classless routing protocol as it supports VLSM and discontiguous networks. It carries subnet mask information in the routing updates.

You can manually summarize OSPF inter-area routes at the Area Border Routers (ABR) and it is possible to summarize OSPF external routes at the Autonomous System Border Routers (ASBR). OSPF does not know the concept of auto summarization.

OSPFv2 supports cleartext and cryptographic authentication via Message Digest type 5 (MD5).


EIGRP vs OSPF: Metric Calculation

This section covers an overview of EIGRP’s and OSPF’s metric calculations.


EIGRP uses Diffusing Update Algorithm (DUAL) to calculate the best routes to remote networks. For a route to be inserted into the routing table, it must satisfy the feasibility condition. This condition is used to prevent loops in the EIGRP networks. The route with the lowest metric to the destination becomes a candidate to be inserted into the routing table. In other words, the lowest metric route is presented as a candidate to be inserted in the routing table as long as it satisfies the feasibility condition. If other routes remain, they must also satisfy the feasibility condition to become backup routes to the destination network if the primary route becomes unavailable.

The feasibility condition requires that the reported metric of a neighbor router to reach a destination subnet must be smaller than the metric of the router receiving the update to reach the same destination.

EIGRP Feasibility Condition

To calculate the cost for each destination network, EIGRP uses a sophisticated metric, which is, by default, composed of bandwidth and delay.


As mentioned before, OSPF uses several different types of packets to exchange information about network topology between routers. These packets are called Link-State Advertisements (LSA) and they describe the network topology in great detail. Each router stores received LSA packets in the Link-State Database (LSDB). After LSDBs are synced between the routers, OSPF uses the shortest path first (SPF) or Dijkstra’s algorithm to calculate the best routes.

OSPF Operations: LSA Updates, Link State DB, SPF Tree, RIB
OSPF Best Route Calculation

Link state information includes a cost value assigned to each interface.


EIGRP vs OSPF: Protocol Number & Addressing

Neither EIGRP nor OSPF relies on TCP or UDP for Layer 4 transport. Each has its own IP protocol number. But default, they both support multicast but they can also be configured to use unicast.


EIGRP Protocol Number in the IP header: 88
EIGRP Multicast Address:


OSPF Protocol Number in the IP header: 89.
OSPF Multicast Addresses: (all OSPF routers) and (DR and BDR routers)


EIGRP vs OSPF: Protocol Operations

This section gives you an introduction to how EIGRP and OSPF discover neighbors and populate their topology databases.


EIGRP stores information in three tables:

  • The neighbor table
  • The topology table
  • The routing table
EIGRP Stores Information in the Neighbor, Topology, and Routing Tables

When an EIGRP router establishes neighbor adjacencies with other EIGRP routers, these routers become neighbors. Those neighbors are stored in the Neighbor Table. EIGRP neighbors are characterized they their primary IP address and the directly connected interface that leads to neighbors.

The topology table contains all destination routes advertised by the neighbor routers. Each entry in the topology table is associated with a list of neighbors that have advertised the destination. For each neighbor, a reported metric is recorded. The reported metric is the metric value announced by a neighbor that it uses to reach a particular destination. When an EIGRP router receives routes with their reported metrics from neighbors, the receiving router determines its own metric value to reach all destination subnets. This value is the sum of the reported metric from the neighbor plus the link cost to the neighbor. Since the same destination could be received from more than one router, the route with the best metric to the destination is called the successor and is placed in the routing table and advertised to the other neighbors.

EIGRP Neighbor Discovery

As far as neighbor discovery, here’s a summary of the EIGRP’s neighbor discovery process and establishment:

  1. R1 sends a hello packet through all its EIGRP-configured interfaces. Interfaces configured as “passive interfaces” do not send hello packets, and therefore neighbors cannot be established over those interfaces.
  2. R2 receives the hello packet on its EIGRP-configured interface and replies with an update packet. This update packet contains the EIGRP routes in the routing table that were not learned through that same interface where the hello packet was received (split horizon rule). As R2 sends an update packet to R1, a neighbor relationship is not established until R2 sends a hello packet to R1. The update packet from R2 has the initialization bit set, indicating that this interaction is in the initialization process. The update packet includes information about the routes that R2 is aware of, including the metric that R2 is advertising for each destination.
  3. After both routers have exchanged hellos and the neighbor adjacency is established, R1 replies to R2 with an ACK packet, indicating that it received the update information.
  4. R1 assimilates all the update packets in its topology table. The topology table includes all destinations that are advertised by neighboring adjacent routers. The topology table lists each destination and all the neighbors that can reach the destination with their associated metrics.
  5. R1 sends an update packet to R2.
  6. Upon receiving the update packet, R2 sends an ACK packet to R1.

After R1 and R2 successfully receive update packets from each other, they are ready to update their routing tables with the successor routes from the topology table.


The OSPF operation can be divided into three distinct steps:

  1. The OSPF router must discover all OSPF neighbors on directly connected interfaces. To establish neighbor relationships, OSPF uses small hello packets, similar to EIGRP. Before two routers on directly connected links become OSPF neighbors, they must agree on certain parameters that are specified in the hello packet. These parameters are:
    1. Area ID
    2. Authentication
    3. Hello and dead intervals
    4. Sub flag
    5. MTU size
  2. The router exchanges link-state information that describes the topology of the network within an OSPF area. Link-state information travels in the form of Link State Advertisements (LSAs) and is flooded through an OSPF area until all routers have identical entries. All LSAs are stored in the Link State Database (LSDB). LSAs received from neighbors are used to build a picture of the network topology from the perspective of the local router. Information that is communicated in LSAs includes each router’s identifier (router ID), interface, IP address, mask, subnet, and a list of all routers reachable on each interface.
  3. Once the LSDBs on all routers within an area are synchronized and all routers have identical database entries, routers start the best path calculation. To calculate the best path to a given destination, OSPF uses the Shortest Path First (SPF) or Dijkstra’s algorithm. The SPF algorithm analyzes and compares all possible paths to the destination from the local router’s perspective (the local router is placed at the top of the tree) and selects the destinations with the smallest metric (cost). This path, together with the next hop and the outgoing interface to the destination, becomes a candidate to be placed in the routing table.
OSPF Operations: LSA Updates, Link State DB, SPF Tree, RIB


EIGRP vs OSPF: Authentication

EIGRP and OSPF have authentication methods to make sure that the router they’re neighboring with is who it says it is.


Message Digest 5 (MD5) is the only authentication method supported by EIGRP and can be configured using a key chain. Using a key chain allows passwords to be rotated without dropping neighbor adjacencies.

EIGRP authentication is configured per interface, and when EIGRP authentication is enabled, every packet that is exchanged between neighbors on those EIGRP-authentication-enabled interfaces must be authenticated to ensure the identity of the neighbors. EIGRP authentication is achieved by using identical pre-shared authentication keys on neighbors.


OSPF authentication data is computed based on a pre-shared authentication key, sometimes referred to as a password. Pre-shared means that the authentication key is known to both the sending and receiving routers. When OSPF authentication is enabled on a router, the router authenticates the source of each routing update packet that it receives and performs this authentication by embedding an authentication data field in each OSPF packet.

When authentication is configured, it must be configured for an entire area.

OSPF authentication is performed in two steps:

  1. Enable OSPF authentication per interface or per area.
  2. Configure an authentication key per interface.

OSPF supports three authentication types:

  • Type 0 (Null authentication): This authentication method means that no authentication information is included in the packet header.
  • Type 1 (Simple password authentication with a cleartext key): In this authentication method, the authentication key is sent in the clear. This method is vulnerable to packet sniffing. The password is entered into the authentication field.
  • Type 2 (Cryptographic authentication with a hash key): In Message Digest 5 (MD5) authentication, the key is cryptographically protected using the MD5 hash algorithm. The hash algorithm performs a series of simple binary calculations that are based on the OSPF packet content and the authentication key. The result of this calculation is called the hash and is written into the authentication field. This hash value is transmitted in the packet along with a key ID and a sequence number that identifies each OSPF packet in the exchange to protect against replay attacks. The receiver, which knows the same password, calculates its own hash value. If nothing in the message changes, the hash value of the receiver should match the hash value of the sender that is transmitted with the message.


EIGRP vs OSPF: Route Summarization

Route summarizations automatically suppress the advertisement of more specific networks without affecting reachability to those networks. Route summarization produces one route that represents a set of more specific routes.


EIGRP’s ip summary-address eigrp interface command will suppress the announcement of more specific networks.

Consider the following example. R1 announces the following subnets to R2.

  1. /24
  2. /24
  3. /24
  4. /24

To summarize these four subnets into /22, the ip summary-address eigrp command needs to be configured under the interface that points to R1.

EIGRP Route Summarization


OSPF can perform two types of address summarization: inter-area summarization and external route summarization. Inter-area summarization consists of summarizing between areas and is always configured on Area Border Routers (ABR). Similarly, external route summarization allows 1) external routes that are being redistributed into the OSPF domain to be aggregated into a summary address and 2) is always configured on Autonomous System Border Routers (ASBRs).

Inter-area summarization is implemented with the area range command whereas external route summarization is configured with the summary-address command.

OSPF Inter-area & External Route Summarization


Closing Thoughts

Although EIGRP and OSPF have the same purpose, they exchange route information for reachability and to determine the best path to destination subnets; however, they both achieve the same goal via different processes or logic.

  • To determine the best path, EIGRP uses DUAL whereas OSPF uses the SPF algorithm.
  • EIGRP uses a composite metric with bandwidth and delay by default whereas OSPF simply uses a cost value assigned to or configured on interfaces.

The purpose of this article was to compare EIGRP vs OSPF to give you an overview of each protocol so you can have an idea of their similarities and differences. Each routing protocol has so many other details that were not covered here. I, therefore, encourage you to look into the details of EIGRP’s dual algorithm, feasible distance, stub routing, stuck-in-active, etc., and also on OSPF’s area types, LSA types, filtering, etc.

If you have any comments or questions, please drop them in the comments section below.

Alirio Zavarce Faceshot


Alirio Zavarce, CCIE #28672, is a seasoned enterprise route-switch consultant with 30 years of experience with data networks. Alirio started this networking blog to help his peers become better network engineers and share all his everyday experiences and troubleshooting tips. More about me...

If Alirio had to prepare to take it again, here's what he would do to pass the CCIE lab.

Please Share

Leave a Comment

Share to...