One of the most asked questions after completion of Cisco training like CCNA or CCNP Routing and Switching is “Which protocol is better EIGRP or OSPF?” and the answer is the most common answer for any comparison question – “It depends”. I have tried to cover positives and negatives of both and tried to be as unbiased as possible.
To make it easy and organized let me break it down into simpler major aspects:
- Algorithm and working – Algorithm used by OSPF is Dijkstra’s Algorithm or SPF (Shortest Path First) algorithm whereas algorithm used by EIGRP is DUAL (Diffusive Update Algorithm). Now the major difference lies in the way these algorithms calculate their best path.
SPF for metric calculation just depends on bandwidth based on which it calculates the cost of a particular link. More the bandwidth lowers the cost. Thus the best path is found based on the route with least total cost.
DUAL uses bandwidth and delay by default to calculate the composite metric using a complex formula, but we can add Load and reliability as additional parameters. MTU is not used in metric calculation formula by the way if you are wondering.
- CPU, Memory and Bandwidth Usage –OSPF is a link state routing protocol so it maintains information about all the networks and OSPF running routers in its area. This makes the database big and each time there is a change within the area, all routers need to re-sync their database and then run SPF again. This process makes it more CPU intensive and keeping the full database in RAM requires more memory. Also, there is more bandwidth required to run SPF Algorithm.
EIGRP, on the other hand, is an enhanced distance vector routing protocol which has triggered and incremental updates. Hence EIGRP is more efficient in terms of CPU, RAM and bandwidth usage as compared to OSPF. Although most of the modern day routers have good RAM so this might not be an issue for you, but you might have older equipment which lacks in RAM and CPU resources.
- Convergence Time – One more key aspect about EIGRP’s algorithm DUAL is that it maintains loop free alternative path backup path if available. So when a network becomes unreachable from the best path, it does its local computation to figure out the next alternative path. This keeps the convergence time to a minimum making routing more faults tolerant and efficient.
If it does not find the alternative path in topology table (a table maintained by EIGRP) then it sends a query message to find the path for the same network from its existing neighbours. Although sometimes in poorly designed EIGRP network this query to neighbours can lead to Stuck in the Active state which is very bad for the whole network.
- Design –Design is another aspect which is very critical to the selection of routing protocol. If you talk about OSPF, area planning should be done very carefully according to the future requirements. If one does not do it properly, OSPF network might become too complex to administer and manage. You have to basically think hierarchically and stretch it out from the backbone area to normal areas. Any area’s size should not become too large for the SPF algorithm to process.
EIGRP does not have any such area planning requirement but it is not a very good protocol for the multi-vendor environment. I know EIGRP has become standard based but still, a lot of vendors don’t support it and most organization don’t have just Cisco only equipment networks.
- Scalability – EIGRP gets more complex in very large scale whereas OSPF limits it using areas. Troubleshooting becomes easier if you have to figure it out in smaller sub parts (area) of the network. Network engineer also needs to consider the future scale of the network in mind and migration activities from one vendor to another to be done in the longer run.
Sometimes organizations acquire other organizations or get acquired. This network merger may require two different network engineer teams to work together. When I think about all this stuff, in my opinion, it’s better to run OSPF compared to EIGRP because it is one of the most popular IGP (Interior Gateway Protocol) around the world.
- Service Provider Support –OSPF if a very good protocol to use on WAN compared to EIGRP, the reason for this is that most of the service provider supports it. They already have OSPF running in their internal environments as an IGP. So, if you ask for an exchange of certain routes for whatever purpose they are happy to exchange OSPF routes with the customer. If you want to use some other routing protocol and exchange same routing information, then most likely you will end up doing redistribution between OSPF and your choice of protocol. This will make things more complicated from routing perspective.
If you are using MPLS as the WAN technology then also OSPF is a better option as it has MPLS traffic engineering support with CSPF (Constrained Shortest Path First).
- Data Centre and Cloud Support –Most of the organizations have some part of their network hosted in a Data Centre or cloud based solution. Sometimes you may require some fine tuning in the network infrastructure underlying and exchange routing information with the firewall. For this type of scenario as well OSPF is a better choice as it is already running in most DC networks.
- Unequal path load balancing–EIGRP is the only protocol which supports unequal path load balancing which can help routers route traffic across links which are of different bandwidth. Network engineer can implement this functionality of EIGRP by configuring variance and load balance packets across links which are twice or thrice as bad as best paths. If your scenario has such a requirement then EIGRP is the way to go.
- IPv6 Support – Both of these protocols support IPv6 so that is something that can be ignored for selection of routing protocol.
- Administrator’s Knowledge – Lastly and the most important piece to consider is the skill of the team managing the network. This is one of the most important aspects as nobody wants to use something on their network which they don’t completely understand. Organizational management is never going to dictate which protocol should be used. Most of the network engineers have a favourite protocol and they will prefer to use it whenever required.
You can go through this table format for easy learning:
|Scalability||2 tier hierarchy, less scalable in general||Support many tiers and scalable|
|Working on Full Mesh||Works well with mesh group feature but this increases configuration complexity||Works very poorly, and there is no mesh group|
|Working on a Ring Topology||Ring is a hard topology for all protocols but OSPF is better than EIGRP||Not good, especially if ring is big due to larger EIGRP query domain|
|Working on Hub and Spoke||Works poorly, require a lot of tuning such as DR Priority||Works very well. It requires minimum tuning|
|Fast Reroute Support||Yes – IP FRR. Loop Free Alternate and other IP FRR mechanisms supported||Yes – IP FRR and Feasible Successor(FS)|
|Suitable on WAN||Yes, OSPF as a place in the network is suitable on the WAN||Yes, EIGRP as a place in the network is suitable on the WAN|
|Suitable on Datacenter||DC in general is a full mesh network.if there is no other option than OSPF is better||DC, in general, is a full mesh network, EIGRP is worse than OSPF|
|Suitable on Internet Edge||No, it is designed as an IGP routing protocol, not as Inter domain routing protocol||No, it is designed as an IGP routing protocol, not as Inter domain routing protocol|
|Standard Protocol||Yes IETF Standard||No, there is a draft but lack of Stub feature|
|Stuff Experience||Very well known||Well known|
|Overlay Tunnel Support||Yes||Yes|
|MPLS Traffic Engineering Support||Yes with CSPF||No, Although EIGRP Verbatim provides manual TE capability|
|Security||It runs on top of IP, so protocol level is not considered as secure||It runs on top of IP. Open to remote attacks same as OSPF|
|Suitable as Enterprise IGP||Yes||Yes|
|Suitable as Service Provider IGP||Yes||No, it doesn’t support Traffic Engineering and other considerations|
|Complexity||Easy protocol but compare to EIGRP, there are many LSA types, so more complex||Easy protocol|
|Policy Support||Good||Not so Good|
|Resource Requirement||SPF requires more processing power||DUAL doesn’t need much power|
|Extendibility||Not good, almost all the field of OSPF packets are already reserved||Good, thanks to TLV support|
|IPv6 Support||Yes, though require new protocol which is OSPFv3||Yes and no need a new protocol thanks to TLV support|
|Default Convergence||Slow convergence with the default timers, although it can be tuned
|Fast with Feasible Successor. Feasible successor is an important for FC
I would be keen to know which team are you on – Team EIGRP or Team OSPF. Drop a comment to tell me same. You can also tell your opinions about OSPF vs. EIGRP in comments.