Administrative Distance

1. Introduction

Have you ever wondered how a router decides which route to use when multiple paths to the same destination are available? What if some paths are more reliable than others? This is where Administrative Distance (AD) comes into play.

AD is a numerical value (between 0 and 255) that tells the router how much it can trust a particular source of routing information. The lower the AD, the more reliable the route is considered.

But why is this important? Without AD, routers might pick less reliable routes, causing inefficiencies.

💬 Imagine a router receives routes to the same destination 192.168.1.0/24 from three sources:

  • OSPF with an AD of 110,
  • EIGRP with an AD of 90, and
  • A static route with an AD of 1.

Which one will the router choose? If you guessed the static route, you’re right! Its AD of 1 makes it the most trustworthy, so it’s added to the routing table.

Router selecting static route (AD 1) over OSPF (AD 110) and EIGRP (AD 90) due to lower Administrative Distance, demonstrating AD importance in routing.

Importance of Administrative Distance in Routing

Why is AD important?

  • Ensures that routers make optimal routing decisions when multiple protocols provide routes to the same destination.
  • Prevents routing conflicts.
  • Guarantees that the most reliable route is selected.

2. Administrative Distance Values

Routing protocols are assigned default Administrative Distance (AD) values based on their reliability and trustworthiness. These values help routers decide which route to prioritize when multiple routes to the same destination are available:

  • Static Routes: These are manually configured by administrators, making them highly trusted and reliable.
  • Dynamic Protocols: These are automatically learned and updated by routing protocols, with their trustworthiness depending on the specific protocol.

Default AD Values

ProtocolDefault AD Value
Directly Connected0
Static Route1
BGP20
EIGRP90
OSPF110
RIP120

Understanding Default AD Values:

  • Connected Routes (AD: 0): Most trusted routes. When an interface is configured with an IP address and brought up, the network is automatically added to the routing table.
  • Static Routes (AD: 1): Highly reliable as they are manually set by network administrators.
  • Dynamic Routes: Learned through routing protocols and provide flexibility and scalability:
    • EIGRP (AD: 90): Highly reliable for internal routing.
    • OSPF (AD: 110): Commonly used in enterprise environments.
    • RIP (AD: 120): Less reliable due to limitations such as a maximum hop count of 15.

3. Administrative Distance (AD) Route Selection

When a router receives multiple routes to the same destination from different protocols, it uses Administrative Distance (AD) to determine which route is the most trustworthy.

The route with the lowest AD is added to the routing table, ensuring the router chooses the most reliable path.

The router R1 is directly connected to two networks (192.168.1.0/24 and 192.168.2.0/24) and receives a route to 192.168.10.0/24 from two neighbors: R2 (using OSPF) and R3 (using EIGRP).

EIGRP network diagram showing Router R1 connected to R2 (OSPF) and R3 (EIGRP), with routes to 192.168.1.0/24, 192.168.2.0/24, 192.168.3.0/24, 192.168.4.0/24, and 192.168.10.0/24. It highlights the Administrative Distance (AD) of 90 for EIGRP links.

The router must choose which route to install in its routing table based on the Administrative Distance (AD) of these protocols. EIGRP has an AD of 90 while OSPF has an AD of 110.

Routing Table on R1:

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
       i - IS-IS, su - IS-IS summary, 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, H - NHRP, l - LISP
       a - application route
       + - replicated route, % - next hop override, p - overrides from PfR

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
      192.168.2.0/24 is variably subnetted, 2 subnets, 2 masks
C        192.168.2.0/24 is directly connected, GigabitEthernet0/1
L        192.168.2.1/32 is directly connected, GigabitEthernet0/1
D     192.168.3.0/24 [90/3072] via 192.168.1.2, 00:08:48, GigabitEthernet0/0
O     192.168.4.0/24 [110/2] via 192.168.2.2, 00:07:55, GigabitEthernet0/1
D     192.168.10.0/24 [90/3328] via 192.168.1.2, 00:00:04, GigabitEthernet0/0

Explanation:

  • EIGRP Route (AD: 90): This route to 192.168.10.0/24 is selected because its AD is lower than OSPF’s AD. Marked as D (EIGRP) in the routing table.

⚠️ If the EIGRP route becomes unavailable, the router will automatically select the OSPF route.

Context:

In this scenario, a router receives multiple routes to the network 192.168.10.0/24 via the RIP protocol. While RIP assigns the same Administrative Distance (AD) of 120 to all routes, the router must evaluate the metric (hop count) to determine the most optimal route.

RIP prioritizes routes based on the lowest hop count, as it considers fewer hops to represent a shorter and more efficient path. When two or more routes have the same AD, the route with the lowest metric is added to the routing table.

Network Diagram:

RIP network topology diagram showing routers R1, R2, R3, R4, R5, and R10 with various network segments (e.g., 192.168.1.0/24, 192.168.2.0/24, etc.). Red circled numbers indicate the hop count from R1 to other segments. Blue arrows show potential routing paths.

Routing Table on R1:

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
       i - IS-IS, su - IS-IS summary, 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, H - NHRP, l - LISP
       a - application route
       + - replicated route, % - next hop override, p - overrides from PfR

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
      192.168.2.0/24 is variably subnetted, 2 subnets, 2 masks
C        192.168.2.0/24 is directly connected, GigabitEthernet0/1
L        192.168.2.1/32 is directly connected, GigabitEthernet0/1
R     192.168.3.0/24 [120/1] via 192.168.1.2, 00:00:28, GigabitEthernet0/0
R     192.168.4.0/24 [120/1] via 192.168.2.2, 00:00:11, GigabitEthernet0/1
R     192.168.5.0/24 [120/2] via 192.168.2.2, 00:00:11, GigabitEthernet0/1
                     [120/2] via 192.168.1.2, 00:00:28, GigabitEthernet0/0
R     192.168.10.0/24 [120/2] via 192.168.1.2, 00:00:28, GigabitEthernet0/0

Explanation:

In this scenario, R1 learns two possible RIP routes to reach the destination network 192.168.10.0/24:

🔹 Path 1: R1 → R2 → R5 (2 hops, preferred)
🔹 Path 2: R1 → R3 → R4 → R5 (3 hops)

The router selects the shortest path (2 hops) since RIP prioritizes routes with the lowest metric.

If the primary path fails, the router will dynamically switch to the backup route to maintain connectivity.