When to prefer Open Shortest Path First (OSPF) route over an EIGRP route
Posted by: David Davis
The shortest path between two points is always a straight line or in this case it’s the administrative distance. OSPF has an administrative distance of 110 while EIGRP has only 90. Therefore, EIGRP would be picked because of its lower administrative cost.
If you want to use OSPF over EIGRP, then change the administrative distance in router configuration mode. Whether you want to change the distance for all routes in the area (intra-area), the distance from one area to another (inter-area), or the distance from other routing domains (external), you can aim closer to the distance using this command. Currently they all have a default distance of 110 but you can change it with one easy command in router configuration mode. Here is the full command:
distance ospf {[intra-area dist1] [inter-area dist2] [external dist3]}
Also a really good incentive to use the distance ospf command is when you have multiple OSPF processes, and you might want to prefer internal routes from other external routes. For more information on OSPF, see the article, OSPF Configuration Management with SNMP documentation.




