EIGRP vs OSPF: Which Route Is Installed in the Routing Table?

eigrp-vs-ospf-route-selection

By Arjun Kumar, Senior Trainer, Systech Group 15+ years in Network Security and Cloud Architecture  · Updated October 2026. 

 9 min read

In short

When EIGRP and OSPF learn the same destination network with the same prefix length, a Cisco router normally installs the internal EIGRP route because its default administrative distance is 90, compared with 110 for OSPF. However, if EIGRP learns the network as an external route, OSPF normally wins because external EIGRP has a default administrative distance of 170.

Table of Contents

Understanding EIGRP vs OSPF route selection helps network engineers troubleshoot connectivity problems, interpret Cisco routing tables and prepare for technical interviews. Learners building these networking fundamentals can explore CCNA training in Chennai to develop practical knowledge of routing, switching and network troubleshooting.

What Happens When EIGRP and OSPF Learn the Same Network?

A router can run multiple routing protocols at the same time. For example, an organisation might use EIGRP in one part of its network and OSPF in another. Both protocols can also run on the same router and independently learn routes to the same destination.

When two routing protocols provide routes to the same destination prefix, the router must determine which route to install in its routing table.

Cisco routers normally use administrative distance (AD) to compare eligible routes learned from different sources. A lower administrative distance is preferred when the routes refer to the same destination prefix and the default selection rules apply.

Because internal EIGRP has an administrative distance of 90 and OSPF has a value of 110, the internal EIGRP route normally wins.

The OSPF process may still know about the destination network, even though its route is not selected as the active route for that prefix.

Key rule: Internal EIGRP normally beats OSPF for the same destination prefix because its administrative distance is lower.

What Is EIGRP?

EIGRP stands for Enhanced Interior Gateway Routing Protocol. It is an advanced distance-vector routing protocol that exchanges routing information between routers.

EIGRP helps routers learn remote networks and select suitable paths to reach them without requiring administrators to configure a static route for every destination.

For example, a company might have three networks:

  • Network A: 192.168.1.0/24
  • Network B: 192.168.2.0/24
  • Network C: 192.168.3.0/24

When routers advertise these networks through EIGRP, other routers participating in the routing domain can learn how to reach them.

EIGRP uses the Diffusing Update Algorithm (DUAL) to calculate loop-free paths and identify feasible backup paths when the required conditions are met.

Its composite metric considers bandwidth and delay by default. Other factors can influence the metric when the configuration is changed.

In a Cisco IPv4 routing table, an EIGRP route normally appears with the code D, while an external EIGRP route normally appears as D EX.

Understanding these routing fundamentals is useful when learning network configuration and troubleshooting. Students looking for practical routing and switching instruction can explore CCNA training in Trichy.

What Is OSPF?

OSPF stands for Open Shortest Path First. It is a link-state routing protocol used to exchange routing information and calculate paths through an IP network.

OSPF routers share link-state information within their areas. They use this information to build a link-state database and run the Shortest Path First (SPF) algorithm to calculate preferred paths.

For example, an organisation might use OSPF to connect its headquarters, branch offices and data centre. Routers exchange information about the network topology so they can calculate paths to remote destinations.

OSPF uses cost as its routing metric. Interface cost is commonly derived from bandwidth, although administrators can configure it manually.

In Cisco IPv4 routing tables, an OSPF route normally appears with the code O.

Both EIGRP and OSPF can calculate routes to the same destination, but they use different path-selection algorithms and metrics. The router does not directly compare an EIGRP metric against an OSPF cost to determine which protocol wins.

For learners interested in building hands-on routing knowledge, CCNA training in Coimbatore is a relevant option to explore alongside practising these concepts in a networking lab.

What Is Administrative Distance, and Why Does It Matter?

Administrative distance indicates how much a router trusts a particular route source. It allows the router to compare routes learned through different routing protocols.

A lower value indicates a more preferred source under the default route-selection rules.

These are standard default values for Cisco routing. Administrators can change some administrative-distance settings, which can change the route-selection outcome.

Administrative distance does not indicate which routing protocol is objectively better. For example, OSPF is widely used in enterprise networks, but internal EIGRP is normally preferred when both protocols advertise the same prefix with their default administrative distances.

Administrative distance is also a local router setting. It is not advertised to neighbouring routers as part of ordinary EIGRP or OSPF routing updates. Consequently, two routers can make different route-source decisions if their configurations differ.

EIGRP vs OSPF: A Step-by-Step Routing-Table Example

Consider a router named R1. It learns the same destination network, 192.168.10.0/24, through both EIGRP and OSPF.

Assume that both routes are valid, the prefix lengths are identical, and default administrative-distance values apply.

The metric values are illustrative. EIGRP and OSPF calculate them differently, so these numbers should not be compared directly.

Step 1: The router learns both routes

R1 receives routing information through EIGRP and OSPF. Both protocols provide a path to 192.168.10.0/24.

Step 2: The router compares administrative distance

The values are:

  • EIGRP: 90
  • OSPF: 110

Because 90 is lower than 110, internal EIGRP is the preferred route source.

Step 3: The EIGRP route is installed

The routing table could display:

D 192.168.10.0/24 [90/30720] via 10.1.1.1

This means that the router has selected the EIGRP route, with 90 representing its administrative distance and 30720 representing the illustrative EIGRP metric.

Step 4: The router forwards traffic

When a packet arrives for a destination in 192.168.10.0/24, R1 uses its forwarding table to determine the appropriate next hop.

If no more-specific matching route changes the decision, the packet is forwarded towards 10.1.1.1.

This example shows how administrative distance determines the preferred route source when the same destination prefix is learned through different protocols.

How to Read a Cisco Routing-Table Entry

Consider this illustrative routing-table entry:

D 192.168.10.0/24 [90/30720] via 10.1.1.1, 00:00:22, GigabitEthernet0/0

Each part provides information about the selected route.

  • D: Identifies an EIGRP route.
  • 192.168.10.0/24: Identifies the destination network and prefix length.
  • 90: Represents the administrative distance.
  • 30720: Represents the EIGRP metric in this example.
  • 10.1.1.1: Identifies the next-hop address.
  • 00:00:22: Shows the route age in this illustrative output.
  • GigabitEthernet0/0: Identifies the outgoing interface.

An OSPF route could instead appear as:

O 192.168.10.0/24 [110/20] via 10.1.2.2

Here, O identifies OSPF, 110 is the administrative distance and 20 is the illustrative OSPF cost.

Understanding this output makes it easier to identify why a router has selected a particular route rather than assuming that the lowest metric always wins.

Important Exception: When Does OSPF Win Over EIGRP?

EIGRP does not always win over OSPF. The result depends on whether the EIGRP route is internal or external.

Internal EIGRP routes have a default administrative distance of 90. External EIGRP routes have a default administrative distance of 170.

An external EIGRP route is commonly introduced into EIGRP through redistribution from another routing source.

Suppose R1 learns the same destination prefix through external EIGRP and OSPF.

The external EIGRP route has an administrative distance of 170, while OSPF has a value of 110. Since 110 is lower than 170, OSPF normally wins.

An external EIGRP route may appear as:

D EX 192.168.10.0/24 [170/30720] via 10.1.1.1

An OSPF route may appear as:

O 192.168.10.0/24 [110/20] via 10.1.2.2

If both routes advertise the exact same prefix and default values apply, the OSPF route is normally installed.

Remember: Internal EIGRP beats OSPF by default, but external EIGRP normally loses to OSPF.

Does the Lowest Routing Metric Always Win?

No. Administrative distance and routing metrics serve different purposes.

Administrative distance compares the trustworthiness of route sources when the same destination prefix is available through different routing protocols.

Routing metrics help each routing protocol compare paths according to its own calculation method.

For example, EIGRP could calculate a metric of 30720 while OSPF calculates a cost of 20. It would be incorrect to assume that OSPF wins just because 20 is numerically smaller.

These metrics measure different things and are not directly comparable.

Within EIGRP, the metric and DUAL calculations help determine preferred and feasible paths. Within OSPF, cost and OSPF path-selection rules determine preferred paths.

When you troubleshoot a route-selection issue, first check whether the destination prefixes match exactly. Then check the route sources, administrative distances and whether the routes are valid.

What If the Routes Have Different Prefix Lengths?

Administrative distance does not override longest-prefix matching during packet forwarding.

Suppose a router has the following routes installed:

  • EIGRP: 192.168.10.0/24
  • OSPF: 192.168.10.0/25

These are different destination prefixes. Both routes can exist in the routing table if they are valid.

If a packet is destined for 192.168.10.10, both routes match the destination address, but /25 is more specific than /24. The router therefore uses the /25 route.

This process is called longest-prefix match.

The difference is important:

  • Administrative distance normally chooses the preferred route source for the same destination prefix.
  • Longest-prefix match chooses the most specific installed route that matches the packet’s destination address.

Do not confuse these two decisions.

What Happens If the EIGRP Route Fails?

Suppose R1 has installed the internal EIGRP route to 192.168.10.0/24, but its EIGRP neighbour goes down.

The route may be withdrawn because the router can no longer reach the destination through that path.

Before the failure, EIGRP is the preferred source because its administrative distance is 90. During convergence, the routing protocols process the change and the router reevaluates the available routes.

If the OSPF route remains valid and its next hop is reachable, the router can install the OSPF route instead.

This is an example of route failover. The router switches to a valid alternative when the preferred route becomes unavailable. The recovery time depends on the routing protocols, topology, failure-detection mechanisms and device configuration.

How to Verify EIGRP and OSPF Route Selection on a Cisco Router

Cisco IOS provides several commands that help you identify the active route and investigate what each routing protocol knows.

1. Display the routing table

show ip route

This command displays routes currently installed in the IPv4 routing table.

2. Check a specific destination

show ip route 192.168.10.0

Replace the example destination with the network you want to investigate. Check the route code, administrative distance, metric and next hop.

3. Display installed EIGRP routes

show ip route eigrp

This displays EIGRP routes installed in the routing table.

4. Display installed OSPF routes

show ip route ospf

This displays OSPF routes installed in the routing table.

5. Check the EIGRP topology table

show ip eigrp topology

This command helps you inspect routing information and paths known to EIGRP. A route known to EIGRP is not necessarily installed as the active route.

6. Inspect the OSPF link-state database

show ip ospf database

This displays information in OSPF’s link-state database. The existence of topology information does not automatically mean that the corresponding route is the active route in the routing table.

7. Inspect routing-protocol configuration

show ip protocols

This displays information about active routing protocols and relevant configuration details.

Use these commands together to investigate why a route is installed, rather than relying on one command alone.

Learners who want to practise these commands and build networking troubleshooting skills can explore CCNA training in Vellore.

Practical Lab: Test EIGRP vs OSPF Route Selection

A hands-on lab is one of the best ways to understand how routing protocols behave when they learn the same destination network.

Lab objective

Verify which route Cisco IOS installs when EIGRP and OSPF learn the same destination prefix.

Lab setup

Use three routers:

  • R1: The router where you will inspect route selection.
  • R2: A possible next hop for the EIGRP path.
  • R3: A possible next hop for the OSPF path.

Configure the topology so that R1 learns the same destination network, such as 192.168.10.0/24, through both routing protocols.

Step 1: Configure IP addresses

Assign IP addresses to the router interfaces and confirm that the links are operational.

Check interface status and basic connectivity before configuring the routing protocols.

Step 2: Configure EIGRP

Configure EIGRP on the relevant routers and advertise the destination network.

Verify that the EIGRP neighbours establish successfully and that EIGRP learns the destination.

Step 3: Configure OSPF

Configure OSPF on the relevant routers and advertise the same destination network.

Verify that the necessary OSPF adjacencies are established and that OSPF learns the destination through its link-state routing process.

Step 4: Check the route selection

On R1, run:

show ip route 192.168.10.0

With default administrative-distance settings, internal EIGRP should be the active route if both protocols provide valid routes to the exact same prefix.

Step 5: Test failover

After confirming that the OSPF path is valid, disconnect or disable the EIGRP path in the lab.

Observe whether the EIGRP route is withdrawn and the OSPF route becomes active after convergence.

Perform this exercise only in a lab or controlled environment, not on a production router.

Expected result

Internal EIGRP normally wins over OSPF because its administrative distance is 90 compared with 110. If the EIGRP route is withdrawn, a valid OSPF route can take over.

For broader infrastructure skills covering routers, switches, system configuration and troubleshooting, Hardware and Networking training in Chennai is also relevant.

Common Mistakes When Comparing EIGRP and OSPF

Mistake 1: Assuming OSPF always wins

OSPF is widely used in enterprise networks, but its popularity does not give it a lower administrative distance. Internal EIGRP has a default value of 90, while OSPF has 110.

Mistake 2: Comparing EIGRP metrics directly with OSPF costs

EIGRP and OSPF calculate their metrics differently. Their raw values cannot be compared directly to select a preferred route source.

Mistake 3: Forgetting external EIGRP

Internal EIGRP has an administrative distance of 90, but external EIGRP has a value of 170. OSPF normally wins against external EIGRP for the same prefix.

Mistake 4: Assuming every learned route appears in the routing table

A routing protocol may know about a network even when its route is not installed as the active route. Protocol databases and the routing table serve different purposes.

Mistake 5: Confusing route selection with longest-prefix match

Administrative distance compares route sources for the same prefix. Longest-prefix match selects the most specific matching route during packet forwarding.

Mistake 6: Changing administrative distance without understanding the impact

Changing administrative distance can alter the preferred route source. Administrators should plan such changes carefully because they can cause suboptimal routing, asymmetric traffic flows or connectivity problems.

EIGRP vs OSPF: Key Differences

Both protocols are useful for exchanging routing information, but they have different algorithms, metrics and operational characteristics. The choice between them depends on network requirements, compatibility, network design and operational practices.

Not sure which route fits you?

Tell us your stream and what you are hoping for, and we will tell you honestly which option suits.

Get course details

Conclusion

When EIGRP and OSPF learn the same destination network with the same prefix length, internal EIGRP normally wins because its default administrative distance is 90, compared with 110 for OSPF.

However, external EIGRP has a default administrative distance of 170, so OSPF normally wins against it. To troubleshoot route selection correctly, examine the destination prefix, route type, administrative distance, metric, next hop and routing-table output.

Frequently asked questions

If EIGRP and OSPF are configured on the same router, which route is installed?

The internal EIGRP route is normally installed when both protocols learn the same destination prefix because its default administrative distance of 90 is lower than OSPF’s value of 110.

Cisco routers normally prefer internal EIGRP because its default administrative distance is 90, whereas OSPF has a default administrative distance of 110.

Internal EIGRP has a default administrative distance of 90.

External EIGRP has a default administrative distance of 170.

OSPF has a default administrative distance of 110 on Cisco routers.

Yes. OSPF normally wins against external EIGRP because its default administrative distance is 110, compared with 170 for external EIGRP. OSPF can also win if administrative-distance settings are changed.

The first value, 90, is the administrative distance. The second value, 30720, is the route metric in this illustrative EIGRP example.

Yes, provided the EIGRP route is withdrawn and the OSPF route remains valid with a reachable next hop. The OSPF route can then be installed after the router reevaluates available routes.

No. Administrative distance compares route sources, while a routing metric helps each routing protocol compare paths using its own calculation method.

Yes. Understanding this topic helps learners interpret Cisco routing tables, understand administrative distance and troubleshoot routing behaviour in practical networks.

Ethical Hacking Course Quick Enquiry Form

Fill the Form Get Free Consultation From Industry Experts!

CCNA Quick Enquiry Form

Fill the Form Get Free Consultation From Industry Experts!

Quick Enquiry Form

Fill the Form Get Free Consultation From Industry Experts!