OSPF Administrative Distance - How preferred is it

OSPF Administrative Distance, or OSPF AD, is the key of electing OSPF among other routing protocols (if existed) leading to the same target within the same routing table, in this blog post we will discover the basics and types of Administrative Distances for OSPF across multiple different platform.


Administrative Distance

For Cisco systems operating systems, regardless of their platforms, all the IOS-XE, IOS-XR, and NX-OS OS's treats OSPF based on the "AD" which has the value of "110". Now the most important thing is not just to know the numerical value which will be useless without knowing its order of preference among the other routing protocol Administrative Distances.


OSPF AD with Cisco OS's

The values will be as follows regarding the Static and Dynamic Routing Protocols:
  • Direct = 0
  • Static = 1
  • eBGP = 20
  • EIGRP = 90
  • OSPF 110
  • IS-IS = 115
  • RIP = 120
  • iBGP = 200
This Shows that OSPF routes to a specific target can be hidden if one of the dynamics (EIGRP or eBGP) routes was installed in the routing table, that also includes the Direct and Static as well.


Route Preference

Dealing with devices/platforms from Juniper Networks will get you to face and operate with JunOS, the one unified operating system they have, across their different platforms. with juniper the concept of Administrative Distance still exists and still play the same role, but instead, they name it only differently here by calling it as "Route Preference".


OSPF AD with Juniper JunOS

Some protocols will be treated differently here, and some others will be missing (cases like EIGRP as it is a Cisco proprietary).
  • Direct/Local = 0
  • Static = 5
  • OSPF internal = 10
  • IS-IS L1/L2 = 15/18
  • RIP = 100
  • OSPF external = 150
  • IS-IS external L1/L2 = 160/165
  • BGP = 170
OSPF here has to types of routes and stands in the middle of the table, with the absence of EIGRP, only Direct/Local and Static routes can beat OSPF routes, making it the most preferred dynamic routing protocol.


Routing Protocol Preference

With another operating system like Huawei's Versatile Routing Platform (VRP) we will see many similarities with the one of JunOS, but there is a small difference to catch in the table described below.


OSPF AD with Huawei's VRP

Still missing EIGRP here, check the surprise of where OSPF stands within the table:
  • Direct = 0
  • OSPF = 10
  • IS-IS L1/L2 = 15/18
  • Static = 60
  • RIP = 100
  • OSPF external = 150
  • BGP = 255
OSPF is the first protocol here!, putting away the Static route, even IS-IS beats Static route as well, interesting...


Route Preference Again

One more platform to check their preferences and that would be The Nokia Service Router Operating System (SR OS).


OSPF AD with Nokia's SR OS

It has the same name and many similar numbers to Juniper's JunOS table:
  • Direct = 0
  • Static = 5
  • OSPF = 10
  • IS-IS L1/L2 = 15/18
  • OSPF external 150
  • IS-IS external L1/L2 = 160/165
  • BGP = 170
So at the end we find Cisco is almost the only one who names it differently, have different protocols, different order, and clearly different numbers of values for the Administrative Distances.

Created by
Orhan Ergun

Orhan Ergun, CCIE/CCDE Trainer, Author of Many Networking Books, Network Design Advisor, and Cisco Champion 2019/2020/2021

He created OrhanErgun.Net 10 years ago and has been serving the IT industry with his renowned and awarded training.

Wrote many books, mostly on Network Design, joined many IETF RFCs, gave Public talks at many Forums, and mentored thousands of his students.  

Today, with his carefully selected instructors, OrhanErgun.Net is providing IT courses to tens of thousands of IT engineers. 

View profile