You have no items in your shopping cart.
The following article provides a guide to choose by comparing two popular routing protocols, OSPF vs. EIGRP. They are types of IGPs (Interior Gateway Routing Protocols). If, at first, you want a deeper understanding of EIGRP, please read our comprehensive article on EIGRP.
Suppose you want to use both protocols simultaneously as a network engineer. A common approach to connecting networks running different routing protocols is called redistribution. This involves configuring a router to advertise routes learned from one protocol into another.
Let's briefly overview OSPF vs. EIGRP.
EIGRP for Corporate Networks: Advantages and Limitations
EIGRP is a popular choice for corporate LAN deployments. Its fast convergence benefits users who require quick access to resources on the network. However, as the size of the LAN grows, EIGRP's scalability limitations might necessitate a transition to OSPF. Though initially a Cisco proprietary protocol, EIGRP was later standardized through RFC 7868 and is now available to all vendors.
OSPF is a link-state protocol. It creates a complete network topology by exchanging link state advertisements (LSAs) between routers. For ISPs and large enterprise networks, OSPF is the routing protocol of choice.
This is due to its superior scalability and the robust structure it provides for dynamic routing. The extensive hierarchy and area-based design of OSPF allow for efficient route management in large and complex networks. Additionally, OSPF is an open standard developed by the Internet Engineering Task Force's (IETF) OSPF Working Group.
We will delve deeper into understanding both routing protocols (IGPs). Let's look at the comparison table for OSPF vs. EIGRP first.
Criteria |
OSPF |
EIGRP |
Type |
Open Standard |
Open Standard (Proprietary to Open) |
Convergence |
Generally slower convergence due to SPF |
Faster convergence with DUAL algorithm |
Scalability |
Suitable for large networks |
Ideal for medium to large networks |
Protocol Type |
Link-state routing protocol |
Hybrid routing protocol |
Convergence Mechanism |
SPF (Shortest Path First) Algorithm |
DUAL (Diffusing Update Algorithm) |
Metric Calculation |
Based on Cost (Bandwidth) |
Based on Bandwidth, Delay, Load, and Reliability |
Routing Updates |
Periodic Link-State Advertisements (LSAs) |
Partial Updates (Diffusing Update Protocol) |
Area Concept |
Uses Areas for Scalability and Hierarchical Design |
Not Applicable |
Support for VLSM |
Yes |
Yes |
Support for Summarization |
Yes |
Yes |
Administrative Distance |
Default: 110 |
Default: Internal - 90, External - 170 |
Authentication |
Supports multiple authentication methods |
Supports multiple authentication methods |
Complex Configuration |
More complex due to the configuration of areas |
Generally simpler configuration |
Vendors Supported |
Supported by multiple vendors |
Supported by multiple vendors |
Multicast Address |
224.0.0.5 (All OSPF Routers), 224.0.0.6 (Designated OSPF Routers) |
224.0.0.10 (EIGRP) |
AS number |
Not applicable |
Required (EIGRP AS number must be configured) |
ECMP Support |
Yes |
Yes |
Resource Consumption |
Resource Consumption |
Lower CPU/Memory |
Load Balancing |
Equal Cost Multipath (ECMP) |
Unequal Cost Multipath (UCMP) |
EIGRP generally offers faster convergence speeds than OSPF. This means it can recalculate routes and quickly adapt to network changes, minimizing traffic disruptions. |
On the other hand, OSPF relies on the Shortest Path First (SPF) algorithm, requiring a full routing table recalculation upon detecting any network change. This process can take slightly longer. |
EIGRP utilizes the Diffusing Update Algorithm (DUAL), which constantly maintains a loop-free backup path. If the primary path fails, EIGRP can seamlessly switch to the pre-calculated backup with minimal delay. |
OSPF utilizes the Dijkstra algorithm (also known as SPF - Shortest Path First) to calculate the shortest path within the OSPF domain (referred to as SPF) |
EIGRP uses shorter default timers for neighbor detection. These timers include hello and hold timers and are shorter than those used in OSPF. This allows for faster recognition of unreachable neighbors and quicker triggering of convergence.
However, it's worth noting that OSPF also supports sub-second hello timers, which can potentially bridge this gap in specific configurations.
The default values for the hello and hold timers in EIGRP are: |
The default values for the hello timers in OSPF are: |
Hello Timer: 5 seconds for LAN interfaces, 60 seconds for WAN interfaces. |
10 seconds on broadcast and point-to-point networks 30 seconds on non-broadcast multi-access (NBMA) networks |
|
|
Hold Timer: 15 seconds for LAN interfaces, 180 seconds for WAN interfaces. |
Time beyond which a neighbor is considered unreachable if no Hello packets are received. Typically set to 4 times the Hello interval. (40 Seconds) |
|
|
These values can be adjusted to suit specific network needs and conditions. However, they serve as the standard settings for most EIGRP deployments. |
These timers can be adjusted based on network requirements and environmental conditions to optimize routing protocol performance. |
BFD is a mechanism that can be used with both protocols to accelerate link failure detection. This enhancement contributes to faster convergence and improved network reliability. Below are the differences of BFD in OSPF vs. EIGRP.
Key Points:
EIGRP prioritizes speed with its pre-calculated backup paths and faster neighbor detection.
OSPF prioritizes accuracy by recalculating the entire routing table, ensuring optimal paths.
Convergence Speed Considerations:
Note:
· Network size and complexity can impact convergence speed. In extensive networks, both protocols may experience slower convergence.
· Optimizing timer settings in both protocols can influence convergence speed.
· BFD implementation aids in faster convergence in the event of link failures.
Open Shortest Path First (OSPF) and Enhanced Interior Gateway Routing Protocol (EIGRP) are both prominent interior gateway protocols (IGPs) that utilize distinct methods for calculating metrics to determine the optimal path for data packets within an autonomous system.
OSPF Metric Calculation
OSPF employs a metric known as "cost" to select the best route. Cost is inversely related to the bandwidth of a link. The formula for calculating OSPF cost is as follows:
Cost = Reference Bandwidth / Interface Bandwidth
The default reference bandwidth is 100 Mbps. However, this value can be modified to accommodate higher-bandwidth links, ensuring that OSPF's cost calculation accurately reflects the capabilities of modern networks. The calculation result must be an integer, so the cost is always rounded up.
Example: For a 100 Mbps interface bandwidth:
Cost = 100 Mbps / 100 Mbps = 1
When multiple paths exist to a destination, OSPF chooses the path with the lowest cumulative cost.
Here are the default cost values for common interface types:
|
Default OSPF Cost |
Serial (56 Kbps) |
1785 |
Ethernet (10 Mbps) |
10 |
Fast Ethernet (100 Mbps) |
1 |
Gigabit Ethernet (1 Gbps) |
1 |
10 Gigabit Ethernet (10 Gbps) |
1 |
40 Gigabit Ethernet (40 Gbps) |
1 |
100 Gigabit Ethernet (100 Gbps) |
1 |
Based on the provided costs, let's calculate the total cost for each path:
R4 to R1 to R2 to R3 to R6:
· R4 to R1 (Cost 10)
· R1 to R2 (Cost 10)
· R2 to R3 (Cost 1)
· R3 to R6 (Cost 10)
· R6 (Cost 10)
Total cost = 10 + 10 + 1 + 10 +10= 41
R4 to R5 to R6:
· R4 to R5 (Cost 10)
· R5 to R6 (Cost 10)
· R6 = (Cost 10)
· Total cost = 10 + 10 + 10 = 30
Based on the calculated costs, the path with the lowest total cost is R4 to R5 to R6, with a total cost of 30. Therefore, this would be the preferred path for routing traffic from R4 to R6 in OSPF.
Now, let's look into another OSPF (Open Shortest Path First) topology and explore how neighborship is established within the network. Below is the multi-area concept.
We have configured OSPF on loopback interfaces within Area 2. R1 and R2's G0/0 interfaces belong to Area 2.
R2's G0/1, R3, and R4's G0/0 interfaces are in Area 0. R4's G0/1 and R5 are in Area 1
R1 is G0/1 is neighbor with ID 2.2.2.1
Similarly, we can see the neighborship established on R2.
DR and BDR
If the Designated Router (DR) fails or becomes unreachable, another router on the network will assume the DR role. This ensures continuous operation of OSPF and helps maintain network stability.
The DR/BDR election process happens at the individual router level within each OSPF area.
This is how the OSPF routing table looks like:
Intra-Area routes (O): These routes are within the same OSPF area. They are advertised by OSPF routers and are used for communication within the area.
Inter-Area routes (IA): These routes are learned from other OSPF areas within the same OSPF. When a router in one area wants to reach a destination in another area, it learns about these destinations through inter-area routes.
OSPF routers continuously update their routing tables based on these changes, ensuring backup paths are always available to reroute traffic in case of primary path failures.
Regarding metric calculation between OSPF vs. EIGRP, EIGRP uses a more complex one, incorporating multiple factors, including bandwidth, delay, load, reliability, and MTU, where bandwidth and delay are the most significant components by default.
The formula used by EIGRP to calculate the metric, often referred to as the composite metric, can be given as:
`Metric = [K1 * Bandwidth + (K2 * Bandwidth) / (256 - Load) + K3 * Delay] * [K5 / (Reliability + K4)]`
It's important to note that with default settings, bandwidth and delay are the most heavily weighted factors in this calculation.
In this example, where I used the show ip protocols command, you can see which K-values are enabled by default. Only K1 and K3 are enabled by default.
The `K` values are constants that can be adjusted to give different weights to the components, with default values typically as follows:
With default values only considering bandwidth and delay, the simplified formula becomes:
`Metric = Bandwidth + Delay`
Where `Bandwidth` is the inverse bandwidth of the slowest link on the path (in terms of EIGRP metric values), and `Delay` is the cumulative delay of all outgoing interfaces on the path to the destination (in microseconds).
This message indicates that a new adjacency has been formed with the router at IP address 1.1.1.2 on interface GigabitEthernet0/0 in EIGRP.
You May check the EIGRP Neighbors:
In the provided output:
P 4.4.4.0/24, 2 successors, FD is 3072
via 1.1.1.2 (3072/2816), GigabitEthernet0/0
via 3.3.3.2 (3072/2816), GigabitEthernet0/1
Both routes have an RD value of 2816, which is less than the FD value of 3072. Therefore, both routes are feasible successors for the network 4.4.4.0/24.
You can run the command show ip eigrp topology
Please note that commands vary depending on the specific vendor.
If the route via 1.1.1.2 were to fail, EIGRP would then consider the route via 3.3.3.2 as the successor route for the network 4.4.4.0/24.
In EIGRP, feasible successors are backup routes that meet the feasibility condition, which means their Reported Distance (RD) is less than the Feasible Distance (FD) of the successor route. Since the route via 3.3.3.2 meets this condition, it would become the new successor route for the network 4.4.4.0/24 if the route via 1.1.1.2 fails.
Feasible successors provide redundancy and fast convergence in case the primary route (successor) fails, ensuring continuous connectivity in the network.
In conclusion, to choose between OSPF vs. EIGRP, you need to assess your requirements and future expansion plans.
Both protocols offer fast convergence, but EIGRP might have a slight edge due to its DUAL approach, which is particularly crucial in large networks where minimizing convergence time is essential. However, it's important to note that the choice between OSPF and EIGRP ultimately depends on your specific requirements.
OSPF offers features like stub areas, which reduce routing information exchange within an area, minimizing routing table size and overhead. Suppose your priority is broad vendor support, such as working as an ISP. In that case, OSPF might be preferable if rapid convergence and bandwidth efficiency are paramount, especially in a Cisco-centric environment.
Before deciding, you need to evaluate each protocol's features, scalability, manageability, and compatibility with your network infrastructure.