Administrative Distance

1. Introduction

In a routing table, each destination network (identified by its prefix and prefix length) can appear only once. Yet, it’s common for a router to learn about the same destination from multiple routing sources.

Administrative Distance (AD) is the value that helps the router decide which of those sources is more trustworthy. It assigns a reliability score to each route, allowing the router to prefer one source over another when multiple options exist.

Network diagram showing a router learning two paths, one via OSPF and one via RIP
Figure 1 – Router learns paths to the same network via OSPF and RIP

To see why this matters, let’s consider a practical example. In the network below, we have four routers, and PC1 needs to send traffic to a server in the 192.168.2.0/24 network.

When the traffic reaches the first router, R1 discovers two possible paths to reach 192.168.2.0/24:

  • One path learned through the OSPF dynamic routing protocol
  • Another path learned through the RIP dynamic routing protocol

Since OSPF and RIP each use their own metric to select the best path, this raises an important question:

  • Which path should be installed in the routing table?
  • Which routing source should R1 trust?
Router deciding between two possible network paths to reach the same destination
Figure 2 – Router faces a choice between two different network paths

This is exactly where Administrative Distance comes into play. In our example, it allows the router to make a choice when different routing sources point to the same destination.

The AD is a number assigned to each route that indicates how reliable the source is. The lower the value, the more the router will trust that route.

Administrative Distance is used first to select the most trusted routing protocol when multiple protocols advertise the same destination. Once the protocol is chosen, its metric is used to determine the best path within that protocol.

2. Default Administrative Distance Value

Below is a table showing the default Administrative Distance values for different types of routes.

Default administrative distance chart comparing routing protocol trust levels.
Figure 3 – Default Administrative Distance

The smaller the Administrative Distance, the more trusted the route is. At the very top, we have directly connected routes with an AD of 0. This makes sense because these networks are physically connected to the router’s interfaces, there’s no need to question their reliability.

Next, we have static routes with an AD of 1. These are configured manually by a network administrator, which means they are considered highly reliable.

Then we move on to dynamic routing protocols. Here, I’ve listed the most common ones and the values you should know for the CCNA.

For example:

  • OSPF has an AD of 110.
  • RIP has an AD of 120.

This means OSPF is preferred over RIP when both learn the same destination, because its AD is lower.

3. How Routers Select Routes

Let’s apply the concept of Administrative Distance to our example.

The path learned through OSPF has an AD of 110, while the path learned through RIP has an AD of 120. Since a lower AD means a more trusted route, the router will select the OSPF path.

OSPF AD 110 versus RIP AD 120 showing the preferred path selected by administrative distance
Figure 4 – Administrative Distance decides: OSPF (AD 110) preferred over RIP (AD 120)

If we check the routing table on R1 using the command show ip route

R1# show ip route
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
       i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
       * - candidate default, U - per-user static route, o - ODR
       P - periodic downloaded static route

Gateway of last resort is not set

     192.168.1.0/24 is variably subnetted, 2 subnets, 2 masks
C       192.168.1.0/24 is directly connected, GigabitEthernet0/0
L       192.168.1.1/32 is directly connected, GigabitEthernet0/0
O    192.168.2.0/24 [110/3] via 192.168.10.2, 00:00:57, GigabitEthernet0/1
     192.168.10.0/24 is variably subnetted, 2 subnets, 2 masks
C       192.168.10.0/24 is directly connected, GigabitEthernet0/1
L       192.168.10.1/32 is directly connected, GigabitEthernet0/1
     192.168.20.0/24 is variably subnetted, 2 subnets, 2 masks
C       192.168.20.0/24 is directly connected, GigabitEthernet0/2
L       192.168.20.1/32 is directly connected, GigabitEthernet0/2
O    192.168.30.0/24 [110/2] via 192.168.10.2, 00:00:57, GigabitEthernet0/1
R    192.168.40.0/24 [120/1] via 192.168.20.2, 00:00:18, GigabitEthernet0/2

The highlighted route to 192.168.2.0/24 is learned via OSPF.
Inside the brackets [110/3], we have two important values:

ospf administrative distance and metric example
Figure 5 – Administrative Distance and OSPF Metric in Routing Table
  • 110 → the Administrative Distance, showing how much the router trusts this source.
  • 3 → the metric, used by OSPF to select the best path among OSPF routes.

Because OSPF’s AD (110) is lower than RIP’s AD (120), the router chooses this OSPF path and installs it in the routing table.

4. Equal Administrative Distance

Now, imagine there is no RIP path and both paths are learned through OSPF. How would R1 decide which one to use?

ospf equal cost routes administrative distance 110
Figure 6 – Two equal-cost OSPF routes with Administrative Distance 110

The router follows a simple decision process:

  1. First, it compares the Administrative Distance, the path with the lowest AD wins.
  2. If the AD is the same, the router compares the metric value within the same routing protocol; the lowest metric wins.
  3. If both the AD and metrics are identical, the router can perform Load Balancing, sending traffic across multiple paths.

In our example, both OSPF routes have an AD of 110 and the same metric of 3, so R1 will load balance traffic between the two paths.

Equal-cost OSPF routes (AD 110) with load balancing.
Figure 7 – Two OSPF (AD 110) paths enabling load balancing.

In this case, half of PC1’s traffic to the server will take one path, and the other half will take the alternate path.

5. Summary

Administrative Distance (AD) is the first criterion a router uses when choosing between multiple routes to the same destination from different sources.

  • Lower AD = more trusted route.
  • If two routes have the same AD, the router compares their protocol metric to pick the best path.
  • If both AD and metric are equal, the router may load balance traffic.
Default Administrative Distance chart with OSPF example showing AD 110 and metric 3 in a Cisco routing table entry.
Figure 8 – Default Administrative Distance Summary

In the example above, [110/3] shows the Administrative Distance (110) for OSPF and the OSPF metric (3).