Table of Contents
Understanding Administrative Distance
Administrative distance is a ranking system that routers use when they learn possible routes to the same destination from different routing sources. It tells the router which source is considered more trustworthy. Administrative distance does not decide the path inside a single routing protocol, that is the job of metrics, and it does not describe how routing protocols work in detail. It is used only when there are multiple competing routes to the same network from different sources.
Imagine a router that knows about network 10.0.0.0/24 from both a static route and from a dynamic routing protocol. The router must choose only one active route for its routing table. Administrative distance gives each source a priority value and the lowest value wins.
Concept of Trustworthiness
Each routing information source is assigned a numeric value called administrative distance. A lower number means higher trust. If a router learns a route to the same destination from two or more sources, it compares the administrative distance values of those sources. The route from the source with the lowest administrative distance is installed into the routing table, and the others become backup, or are ignored, depending on the implementation.
Administrative distance is local to the router. It is not carried inside packets and is not agreed on between neighbors. Two routers can have different administrative distance values configured for the same protocol and they will still exchange routes normally. This means that route selection can differ from router to router even when they see the same routing information.
Administrative distance rule:
If multiple routes to the same destination exist from different sources, the route with the lowest administrative distance is selected for the routing table.
Typical Default Administrative Distances
Vendor defaults can vary, but many devices follow values that are similar to the ones popularized by Cisco. The table below shows common default administrative distances. These are examples, not strict standards, but they help you understand the relative trust level for each type of route.
| Source of Route | Typical Default Administrative Distance | Notes |
|---|---|---|
| Connected interface | 0 | Most trusted, directly attached |
| Static route | 1 | Manual configuration |
| External BGP (EBGP) | 20 | Routes learned from external AS |
| Internal EIGRP | 90 | Interior dynamic protocol |
| IGRP (legacy) | 100 | Older protocol |
| OSPF | 110 | Link state interior routing |
| IS-IS | 115 | Another link state protocol |
| RIP | 120 | Older distance vector |
| External EIGRP | 170 | EIGRP routes redistributed in |
| Internal BGP (IBGP) | 200 | Within the same AS |
| Unknown or untrusted source | 255 | Route is never used |
The exact list you see on a device can differ, but the important idea is that smaller numbers are preferred. Connected routes are always preferred over static, and static is usually preferred over dynamic routing protocols.
How a Router Uses Administrative Distance
When a router learns routes, it first groups them by destination prefix. For each destination, there can be several potential routes coming from different sources. The router compares the administrative distance of those sources. Only the best one is allowed into the routing table.
For example, assume a router knows about network 192.168.50.0/24 from the following sources at the same time:
| Source | Administrative Distance | Result |
|---|---|---|
| Static | 1 | Selected route |
| OSPF | 110 | Ignored, higher distance |
| RIP | 120 | Ignored, higher distance |
The router picks the static route because its administrative distance 1 is lower than 110 and 120. The RIP and OSPF routes remain in the routing information base of those protocols, but they do not appear as active routes in the main routing table.
If the static route is removed or becomes unusable, the router will then consider the remaining candidates. It compares OSPF and RIP, sees that 110 is lower than 120, and installs the OSPF route. If OSPF later stops advertising that network, then the router would fail over again and use the RIP route.
So administrative distance also controls fallback behavior. When the most trusted route disappears, the router moves to the next most trusted route for that destination.
Interaction With Metrics
Inside a single routing protocol, the protocol uses its own metric to decide the best path. Administrative distance is not involved in that internal choice. The protocol presents to the router only its single best route for each destination, based on its metric.
The router then looks at all best routes from all sources and applies administrative distance to choose which one wins overall. Administrative distance operates between sources, while metrics operate within one source.
You can see how this layering works in a simple scenario:
- RIP might know three paths to network 10.1.0.0/16. It uses its own metric to select one best RIP path.
- OSPF might know two paths to the same network. It uses its own metric to select one best OSPF path.
- The router is left with two candidate routes for 10.1.0.0/16, one from RIP and one from OSPF.
- The router applies administrative distance, comparing 120 for RIP and 110 for OSPF, and chooses the OSPF route.
The user does not need to control the metrics of different protocols to make this decision. It is handled by the administrative distance values.
When Administrative Distance Matters
Administrative distance matters whenever a router runs more than one method of routing at the same time, or when it has both static routes and dynamic protocols configured. In simple environments where only one dynamic routing protocol is in use and there are no overlapping static routes, administrative distance might never come into play.
Common situations where administrative distance is important include:
Multiple routing protocols on the same router. For example, a router is running both OSPF and RIP. If both protocols learn about the same destination network, the administrative distance decides which protocol's route is used.
Static backup routes. A static route can be configured with a higher administrative distance so that it becomes a backup path. The dynamic protocol route is preferred in normal conditions, and the static route is used only if the dynamic route is lost.
Migration between routing protocols. When moving a network from one protocol to another, both may run at the same time for a period. Administrative distance is often adjusted temporarily so that the new protocol becomes preferred without disrupting connectivity.
Redistribution between protocols. When routes are redistributed from one protocol into another, you can create situations where the same network appears from multiple directions. Administrative distance helps prevent loops and controls which version of a route is used.
Tuning Administrative Distance
Most routers allow you to change administrative distance values for specific types of routes. This gives you a simple way to influence which routing source is preferred, without changing the internal metrics of the protocols.
For instance, if you want OSPF routes to be preferred over static routes for certain destinations, you can increase the administrative distance of those static routes so that they are used only as a last resort. Or you might lower the administrative distance of a dynamic protocol so that its routes override others during a transition period.
There are two common styles of tuning:
Global per protocol. You can change the default administrative distance for an entire protocol on a router. This affects all routes that protocol contributes.
Per route or per neighbor. You can set a special administrative distance for specific static routes, or for routes learned from a particular neighbor or source. This is more precise, because it lets you change behavior only where needed.
Tuning administrative distance should be done carefully. If you change values without a clear plan, you might accidentally make less reliable routes win over better ones, or break intended backup behaviors.
Primary and Backup Routes Using Administrative Distance
A very practical use for administrative distance is to create a backup route that activates only if the primary route fails. You do this by setting the backup route with a higher administrative distance.
Consider a router that has:
A dynamic OSPF route to 0.0.0.0/0 with administrative distance 110.
A static route to 0.0.0.0/0 pointed at an internet connection with administrative distance 200.
The router will use the OSPF default route in normal operation, because 110 is lower than 200. If the OSPF neighbor goes down and the OSPF route disappears, the router has no dynamic default route left. It then looks at the static route with distance 200 and installs that route in the routing table. This provides automatic backup without additional mechanisms.
The important detail here is that the backup static route is not equal in distance to the OSPF route. If it were equal or lower, it could compete or even override the primary route. By choosing a clearly higher administrative distance, you tell the router that this route is only for emergencies.
Interaction With Default Routes and Summarized Routes
Administrative distance also matters for default and summarized routes when different sources provide them. If two default routes exist from different protocols, the router selects the one with the lower administrative distance. Similarly, if a summary route from one protocol overlaps more specific routes from another, the router will use administrative distance first to decide which source is trusted. Specificity of prefixes and metrics are handled separately, but administrative distance remains the top decision factor between sources that present competing information for the same prefix.
When designing networks with multiple exit paths or hierarchical summaries, making clear choices about administrative distance helps avoid confusion and unwanted path selection.
Limitations of Administrative Distance
Administrative distance is a simple numeric preference. It does not examine bandwidth, latency, or real performance of a path. It only reflects a belief that certain sources are more trustworthy than others. If the defaults for a router say "prefer static over OSPF," the router will do so even if the static route leads to a slower or less capable link. That quality assessment must be done by the network designer, who then chooses appropriate administrative distance values.
Administrative distance also does not solve every routing conflict. It cannot fix design problems like routing loops or bad redistribution plans by itself. It only decides which routing source wins when more than one points to the same destination.
Understanding administrative distance gives you a powerful and simple tool to control route selection. Combined with knowledge of static routes, dynamic routing, and routing tables, it lets you shape which paths are used, which are kept as backups, and how multiple routing protocols can coexist on the same device.