Administrative Distance (AD)

1. What Is Administrative Distance?

Administrative Distance (AD) is a numeric value (0–255) that Cisco IOS uses to rank the trustworthiness of a routing information source. When a router learns about the same destination network from multiple routing protocols or sources simultaneously, AD determines which route is installed in the routing table — the source with the lowest AD wins.

AD is a local value — it is not advertised to other routers and does not affect how neighboring routers make their own routing decisions. It exists purely to resolve conflicts on the local router between competing route sources.

Analogy: Think of AD like a credibility rating for your news sources. If both your most trusted colleague (AD 90 — EIGRP) and a less reliable source (AD 120 — RIP) tell you about the same destination, you trust the colleague and use their directions — regardless of which source claims the shorter path.
Key rule: AD is only compared when two or more different routing sources (protocols) have routes to the same destination network. AD is never compared between routes from the same protocol — the metric handles that distinction.

Related pages: Default Routes | show ip route Command | show ip protocols Command | OSPF Overview | EIGRP Overview | RIP Concepts | BGP Overview | Static Routing Configuration (Step-by-Step) | Troubleshooting Layer 3 Routing

2. Default AD Values — Complete Reference Table

Every routing source has a default AD value assigned by Cisco IOS. These values are fixed unless manually overridden. Memorising these is a direct CCNA exam requirement.

Route Source Default AD Trustworthiness Notes
Connected interface 0 Highest (absolute trust) Router is directly attached — no routing needed
Static route 1 Near-absolute Manually configured by admin; overrides all dynamic protocols
eBGP (External BGP) 20 Very high Routes learned from external BGP peers (between AS)
EIGRP (internal) 90 High Routes learned within the same EIGRP AS
IGRP 100 Moderate-high Cisco legacy; obsolete — replaced by EIGRP
OSPF 110 Moderate Most common enterprise IGP; used heavily on CCNA exam
IS-IS 115 Moderate Common in service provider networks
RIP 120 Lower Legacy distance-vector protocol; hop count metric; limited to 15 hops
EIGRP (external) 170 Low Routes redistributed into EIGRP from another protocol
iBGP (Internal BGP) 200 Very low Routes learned from iBGP peers (within same AS)
Unreachable / unusable 255 None — never used AD 255 means the route is never installed in the routing table
Memory trick for CCNA: C-S-e-E-O-R-Ee-i → Connected (0), Static (1), eBGP (20), EIGRP internal (90), OSPF (110), RIP (120), EIGRP External (170), iBGP (200). Lower number = more trusted.

3. AD vs. Metric — Critical Distinction

AD and metric are frequently confused on the CCNA exam. They serve completely different purposes and operate at different stages of the route selection process.

Property Administrative Distance (AD) Metric
Purpose Ranks trustworthiness between different routing protocols/sources Ranks the best path within the same routing protocol
Applied when Two different protocols both have a route to the same destination Same protocol has multiple paths to the same destination
Lower value means More trusted — preferred route installed in routing table Better path — shorter, faster, or lower cost
Scope Local to the router — never advertised Advertised between routers running the same protocol
Units Unitless integer 0–255 Protocol-specific: hops (RIP), cost (OSPF), composite (EIGRP)
Decision order Checked first — eliminates all but the most trusted source Checked second — only after AD selects the winning protocol

Route Selection Decision Flow

  Router receives routes to 192.168.10.0/24 from multiple sources
                          │
                          ▼
              Step 1 — Compare Administrative Distance
              (Which source is most trusted?)
                          │
         ┌────────────────┼────────────────┐
         │                │                │
      OSPF (AD 110)   RIP (AD 120)   EIGRP (AD 90)
         │                │                │
         └────────────────┴────────────────┘
                          │
                 EIGRP wins (AD 90 is lowest)
                 OSPF and RIP routes discarded
                          │
                          ▼
              Step 2 — Compare Metric (same protocol only)
              EIGRP has 2 equal-cost paths:
              Path A: composite metric 2172416
              Path B: composite metric 5120000
                          │
                 Path A wins (lower metric)
                          │
                          ▼
              Step 3 — Install in routing table
              D 192.168.10.0/24 [90/2172416] via 10.1.1.1
            

4. Reading AD Values in the Routing Table

The show ip route command displays the routing table with AD and metric for each entry. Understanding how to read this output is a key CCNA skill.

Router# show ip route

Codes: C - connected, S - static, R - RIP, D - EIGRP,
       O - OSPF, B - BGP, i - IS-IS

Gateway of last resort is 0.0.0.0 to network 0.0.0.0

C    192.168.1.0/24 is directly connected, GigabitEthernet0/0
S    10.0.0.0/24 [1/0] via 192.168.2.1
O    172.16.0.0/16 [110/65] via 192.168.3.1, 00:02:34, Serial0/0/0
D    192.168.4.0/24 [90/2172416] via 192.168.5.1, 00:01:23, Gi0/1
R    10.1.0.0/16 [120/3] via 192.168.6.1, 00:00:27, Gi0/2
B    203.0.113.0/24 [20/0] via 198.51.100.1

How to Read the [AD/Metric] Notation

Route Entry Code AD Metric Meaning
C 192.168.1.0/24 C = Connected 0 0 Directly attached — no AD displayed, always preferred
S 10.0.0.0/24 [1/0] S = Static 1 0 Static route; AD=1; metric=0 (static routes have no metric)
O 172.16.0.0/16 [110/65] O = OSPF 110 65 OSPF route; cost of 65 to reach this network
D 192.168.4.0/24 [90/2172416] D = EIGRP 90 2172416 EIGRP internal route; composite metric 2172416
R 10.1.0.0/16 [120/3] R = RIP 120 3 RIP route; 3 hops to destination
B 203.0.113.0/24 [20/0] B = BGP 20 0 eBGP route; AD=20 (external BGP)
Format: The bracket notation [AD/metric] always follows the network address. The first number is always the AD; the second is always the metric. Connected routes (C) do not display brackets because they have AD 0 and are always preferred without comparison.

5. Modifying Administrative Distance

Cisco IOS allows AD to be modified at the protocol level or on individual static routes. This is done deliberately to change route preference — for floating static routes, path manipulation, or redistribution control.

Modifying AD on a Static Route

The AD of a static route is set by appending a number (1–255) at the end of the ip route command. The default is 1 if omitted.

! Default static route (AD = 1) — preferred over all dynamic protocols
Router(config)# ip route 192.168.1.0 255.255.255.0 10.0.0.1

! Static route with AD 150 — less preferred than OSPF (AD 110) but more preferred than RIP (AD 120)
Router(config)# ip route 192.168.1.0 255.255.255.0 10.0.0.1 150

! Floating static route (AD 121) — backup behind RIP (AD 120)
Router(config)# ip route 0.0.0.0 0.0.0.0 10.0.0.2 121

Modifying AD for an Entire Routing Protocol (OSPF)

! Change OSPF AD from 110 to 85 (makes OSPF preferred over EIGRP internal at 90)
Router(config)# router ospf 1
Router(config-router)# distance 85

! Restore default OSPF AD
Router(config-router)# no distance 85

Modifying EIGRP AD Separately (Internal and External)

! Change EIGRP internal AD from 90 to 80
! Change EIGRP external AD from 170 to 160
Router(config)# router eigrp 100
Router(config-router)# distance eigrp 80 160

Modifying AD for Specific Routes Only (OSPF distance command with ACL)

! Apply AD 95 only to OSPF routes learned from 10.1.1.1
Router(config)# access-list 10 permit 192.168.50.0 0.0.0.255
Router(config)# router ospf 1
Router(config-router)# distance 95 10.1.1.1 0.0.0.0 10
Caution: Modifying AD affects route selection immediately upon applying the command — routes may be removed from or added to the routing table in real time. Always test AD changes in a lab or maintenance window, and always verify with show ip route afterwards.

6. Floating Static Routes

A floating static route is a static route configured with a deliberately high AD — higher than the primary dynamic routing protocol — so it only enters the routing table when the primary route is lost. It "floats" above the primary route and only descends into use during a failure.

How Floating Static Routes Work

  Normal operation:
  ┌─────────────────────────────────────────────────────┐
  │ Routing Table                                       │
  │                                                     │
  │ O 192.168.10.0/24 [110/20] via 10.1.1.1 (OSPF)   │ ← Active
  │   (Floating static [150] suppressed — higher AD)   │ ← Hidden
  └─────────────────────────────────────────────────────┘

  After OSPF primary link fails:
  ┌─────────────────────────────────────────────────────┐
  │ Routing Table                                       │
  │                                                     │
  │ S 192.168.10.0/24 [150/0] via 10.2.2.2            │ ← Now active!
  │   (OSPF route gone — floating static takes over)   │
  └─────────────────────────────────────────────────────┘
            

Floating Static Route Configuration Examples

! Primary path: OSPF (AD 110) learns 192.168.10.0/24 dynamically
! Backup: Floating static via backup ISP link (AD 150 > 110)
Router(config)# ip route 192.168.10.0 255.255.255.0 10.2.2.2 150

! Floating default route (backup when primary default route is lost)
! Primary OSPF default (AD 110) is preferred
Router(config)# ip route 0.0.0.0 0.0.0.0 203.0.113.1 115   ! Backup ISP

! Dual-ISP floating default — ISP1 primary static (AD 1), ISP2 floating (AD 5)
Router(config)# ip route 0.0.0.0 0.0.0.0 198.51.100.1        ! ISP1 primary (AD 1)
Router(config)# ip route 0.0.0.0 0.0.0.0 203.0.113.1 5       ! ISP2 backup (AD 5)
Real-world use case: Floating static routes are extremely common in dual-ISP deployments. The primary ISP connection is learned via BGP (AD 20) or configured as a static default (AD 1). The backup ISP is configured as a floating static with AD 5 or higher — it only activates if the primary route disappears from the routing table.

See: Default Routes | Static Routing Configuration | Default Route Redistribution in OSPF

7. AD in Multi-Protocol Environments

In real enterprise networks, multiple routing protocols often coexist — OSPF for the core, EIGRP for branches, BGP for internet connectivity, and static routes for specific needs. AD determines which protocol's routes win on any given router where multiple sources compete.

Practical Multi-Protocol Scenario

Scenario: A router at a branch office runs OSPF (to the core), RIP (legacy from an old segment), and has a static default route. It learns about 10.100.0.0/16 from both OSPF and RIP.
  Routes received for 10.100.0.0/16:
  ┌────────────────────────────────────────────────────────┐
  │  Source   │  AD   │  Metric  │  Next-hop              │
  ├────────────┼───────┼──────────┼────────────────────────┤
  │  OSPF     │  110  │  cost 30 │  via 192.168.1.1       │
  │  RIP      │  120  │  3 hops  │  via 192.168.2.1       │
  └────────────┴───────┴──────────┴────────────────────────┘

  Result: OSPF wins (AD 110 < 120). RIP route is NOT installed.
  Routing table shows: O 10.100.0.0/16 [110/30] via 192.168.1.1

Route Redistribution and AD

When routes are redistributed from one protocol into another, the redistributed routes receive the external AD of the receiving protocol:

  • Routes redistributed into EIGRP become EIGRP external routes with AD 170 (not the usual 90).
  • Routes redistributed into OSPF become OSPF external routes (Type E1 or E2) with AD 110 (same as internal OSPF).
  • Routes redistributed into BGP as iBGP have AD 200.
! On Router redistributing OSPF into EIGRP
Router(config)# router eigrp 100
Router(config-router)# redistribute ospf 1 metric 10000 100 255 1 1500

! Redistributed routes appear in other EIGRP routers as:
! EX 172.16.0.0/24 [170/2170112] — AD 170 (external), not 90 (internal)
AD 170 trap: If a router running EIGRP receives the same prefix as both an EIGRP internal route (AD 90) and an EIGRP external route (AD 170) — perhaps due to redistribution — the internal route always wins. This prevents routing loops in redistribution scenarios.

8. Impact of Misconfigured AD

Incorrect AD values are one of the most dangerous and difficult-to-diagnose routing misconfigurations because the router continues operating — just with the wrong routes installed.

Common Misconfiguration Scenarios

Misconfiguration Effect Symptom
Static route AD left at default (1) when dynamic protocol should be preferred Static route permanently overrides the dynamic route — even when the dynamic route is more accurate Traffic follows stale or incorrect static path; dynamic routing changes have no effect
Floating static AD set equal to or lower than primary dynamic AD Backup route competes with primary — load-balancing or flapping may occur Intermittent connectivity; traffic may take unexpected paths
Protocol AD changed on one router but not others Inconsistent route selection across routers — asymmetric routing Packets take different paths in each direction; stateful firewall/NAT failures
AD set to 255 accidentally Route is never installed in routing table — destination unreachable Complete connectivity loss to affected prefixes; no route in show ip route
iBGP (AD 200) competing with OSPF (AD 110) for same prefix OSPF wins — iBGP route not installed even if iBGP has the better path Suboptimal routing; BGP best-path not used

How to Detect AD Misconfiguration

! Check what is currently installed in the routing table
Router# show ip route 192.168.10.0

Routing entry for 192.168.10.0/24
  Known via "ospf 1", distance 110, metric 20
  Last update from 10.1.1.1 on GigabitEthernet0/0, 00:03:22 ago

! Check if the expected route exists but is NOT installed (lost to AD)
! Use show ip route to see what won — if the expected protocol is absent,
! a lower-AD source is overriding it

! Check all routes a specific protocol knows (whether installed or not)
Router# show ip ospf database
Router# show ip eigrp topology all-links
Router# show ip rip database

9. Troubleshooting AD-Related Routing Issues

Symptom Likely AD-Related Cause Diagnostic Command & Fix
Route installed is not from the expected protocol Another source has a lower AD and is winning the selection show ip route <network> — check [AD/metric]; identify which source won and compare ADs
Floating static route is active when primary should be up Primary dynamic route is not being learned — protocol issue, not AD Verify the dynamic protocol is receiving the route: show ip ospf database or show ip eigrp topology
Traffic not failing over when primary link goes down Floating static AD is higher than expected — primary route is still present Confirm primary route disappeared: show ip route; check floating static is configured with AD > primary protocol's AD
Route not in routing table at all AD may have been set to 255 (route never installed) or route is suppressed Check for distance 255 under the protocol; verify route source is active and reachable
Asymmetric routing — different paths in each direction AD modified on one router only; inconsistent protocol preference Compare show ip route on all relevant routers; check for inconsistent distance commands

Key Verification Commands

Command What It Shows
show ip route Full routing table with [AD/metric] for every installed route
show ip route <network> Detailed entry for a specific route — shows AD, metric, next-hop, age, interface
show ip protocols Active routing protocols and their configured distances (AD values)
show ip ospf database All OSPF LSAs — confirms OSPF knows the route even if it lost to a lower AD
show ip eigrp topology all-links All EIGRP routes including those not installed due to higher AD
show running-config | section router All routing protocol configs — reveals any distance overrides
debug ip routing Real-time routing table changes — shows when routes are added/removed and why

See: show ip route Command | show ip protocols Command | Troubleshooting Layer 3 Routing

10. Vendor-Specific Routing Preference Comparison

AD is Cisco-specific terminology. Other vendors use similar concepts with different names and different default values. Understanding this is useful when working in multi-vendor environments.

Vendor Concept Name OSPF Default Static Default EIGRP Default RIP Default Notes
Cisco IOS Administrative Distance 110 1 90 (internal) / 170 (external) 120 Lower = more trusted
Juniper JunOS Route Preference 10 (internal) / 150 (external) 5 N/A (Juniper doesn't run EIGRP) 100 Lower = more trusted (same logic, different values)
Huawei VRP Preference 10 60 N/A 100 Lower = more trusted
Aruba / HP Administrative Distance 110 1 N/A 120 Same as Cisco for common protocols
Critical multi-vendor point: When a Cisco and Juniper router are redistributing routes between protocols, the AD/preference values do not synchronise automatically. Each router uses its own local values. A route that Juniper prefers may be overridden on the Cisco side by a different source with lower AD — always verify route selection on each vendor separately.

11. Best Practices for Managing Administrative Distance

  • Never modify AD without a clear design reason. Default values are carefully chosen to reflect protocol trustworthiness — arbitrary changes can cause subtle and hard-to-diagnose routing issues.
  • Document every AD modification in your network documentation with the reason, date, and expected behaviour. Include the before/after routing table output.
  • Use floating static routes (not AD 1 statics) when you need backup paths. Always verify the floating static AD is strictly greater than the primary dynamic protocol's AD.
  • Test in a lab or maintenance window. AD changes take effect immediately and can cause traffic loss or routing loops if misconfigured.
  • Keep AD values consistent across all routers in the same domain. Inconsistent AD on different routers causes asymmetric routing — traffic enters from one path and exits via another, breaking stateful firewalls and NAT.
  • Use show ip route immediately after any change to confirm the expected routes are now installed and no unexpected routes have appeared.
  • Avoid setting AD to 255 unless you specifically intend to suppress a route entirely — it makes the route invisible to the router.

12. Common Misconceptions About AD

  • "A lower metric always wins over a higher metric, regardless of protocol."
    No — AD is evaluated first. A RIP route with 1 hop (metric 1) will never beat an OSPF route with cost 1000 (metric 1000) because OSPF's AD (110) is lower than RIP's (120). The metric comparison only happens between routes from the same protocol.
  • "AD is advertised to neighbouring routers."
    AD is strictly local to the router. It is never included in routing protocol updates. Neighbouring routers use their own local AD values independently.
  • "Floating static routes are always in the routing table as a backup."
    Floating static routes only appear in the routing table when the primary dynamic route is gone. While the primary route is active, the floating static is suppressed — it does not appear in show ip route output at all.
  • "Directly connected routes always beat static routes — AD 0 is always in the table."
    Connected routes (AD 0) represent the network on the directly attached interface. Static routes (AD 1) can point to other networks reachable via that interface. They don't compete for the same destination — connected routes are for the attached subnet, static routes for remote destinations.
  • "EIGRP always beats OSPF because 90 < 110."
    This is true by default, but either protocol's AD can be modified. More importantly, EIGRP external routes (AD 170) lose to OSPF (AD 110) — so redistributed EIGRP routes are less preferred than OSPF. The specific route type matters, not just the protocol name.

13. Key Points & Exam Tips

  • AD is a local value — never advertised. Ranges 0–255; lower is more trusted.
  • Memorise the default AD table: Connected (0), Static (1), eBGP (20), EIGRP internal (90), OSPF (110), IS-IS (115), RIP (120), EIGRP external (170), iBGP (200).
  • AD is compared first; metric is compared second (only within the same protocol).
  • A floating static route has AD deliberately set higher than the primary dynamic protocol — it only activates when the primary route is lost.
  • AD 255 = route is never installed. AD is set this way to suppress a route completely.
  • EIGRP external routes (AD 170) lose to OSPF (110) — a common exam trap in redistribution scenarios.
  • The [AD/metric] notation in show ip route — first number is always AD, second is always metric.
  • Changing AD on one router only causes asymmetric routing — a dangerous misconfiguration in stateful environments.
  • iBGP (AD 200) is intentionally high — it is meant to be a last resort, losing to all IGPs so that internal routing information takes precedence over BGP for local prefixes.

Related pages: Default Routes | OSPF Overview | EIGRP Overview | RIP Concepts | BGP Overview | show ip route | show ip protocols | Static Routing Config (Step-by-Step) | Default Route Redistribution in OSPF | OSPF Single-Area (Step-by-Step) | EIGRP Configuration (Step-by-Step) | RIPv2 Configuration (Step-by-Step) | Route Summarisation | Troubleshooting Layer 3 Routing

14. Administrative Distance Quiz

1. A router running both OSPF and EIGRP receives routes for 10.50.0.0/24 from both protocols. OSPF metric is 50 and EIGRP metric is 2,500,000. Which route is installed in the routing table and why?

Correct answer is C. AD is always evaluated before metric. EIGRP's default AD is 90; OSPF's is 110. Since 90 < 110, EIGRP's route wins regardless of its metric. Metric is only compared between routes from the same protocol — it is never used to compare between different routing sources.

2. A network engineer wants a floating static default route to activate only when the primary OSPF-learned default route (AD 110) fails. Which command correctly configures the floating static?

Correct answer is D. The floating static must have an AD strictly greater than the primary route's AD (110 for OSPF). Option A (no AD) defaults to AD 1 — it would always override OSPF. Option B (AD 90) and C (AD 100) are both lower than 110 — they would also override the OSPF default. AD 111 is the minimum value that makes the static "float" above OSPF. Any value from 111–254 works; 111 is the most common choice.

3. An engineer runs show ip route 172.16.0.0 and sees the entry D EX 172.16.0.0/16 [170/2562816]. What does this tell you?

Correct answer is B. The code D EX indicates an EIGRP External route — a route that was redistributed into EIGRP from another routing protocol (such as OSPF, RIP, or a static route). External EIGRP routes have a default AD of 170 (versus 90 for internal EIGRP routes). The [170/2562816] confirms this: AD=170, metric=2562816.

4. A router has both a static route and an OSPF route for 192.168.100.0/24. The static route was configured without a custom AD. The OSPF route has a cost of 5. Which route appears in the routing table?

Correct answer is A. A static route configured without a custom AD defaults to AD 1. OSPF has AD 110. Since 1 < 110, the static route wins and is the only route installed in the routing table. The OSPF route exists in OSPF's database but is not installed. This is why floating static routes must have their AD explicitly set above the dynamic protocol's AD — otherwise the static always wins.

5. An engineer modifies OSPF's administrative distance to 85 on Router A only. Router B in the same OSPF domain still uses the default AD of 110. Both routers learn about the same prefixes from both OSPF and EIGRP. What is the likely consequence?

Correct answer is C. AD is a local value — it takes effect immediately on Router A only and is never advertised. Router A now prefers OSPF (AD 85 over EIGRP 90) while Router B still prefers EIGRP (AD 90 over OSPF 110). Traffic from Router A to the destination follows the OSPF path; return traffic from Router B follows the EIGRP path. This asymmetric routing can break stateful firewalls, NAT, and TCP sessions.

6. A router's routing table shows no entry for 10.200.0.0/24, even though the OSPF neighbour relationship is up and the neighbour is advertising that prefix. What is the most likely cause related to AD?

Correct answer is B. AD 255 is the special value that tells IOS "never install this route." If a distance command with an ACL has been applied to OSPF filtering that specific prefix with AD 255, the route will appear in the OSPF database (show ip ospf database) but will never be installed in the routing table. Check show running-config | section router ospf for any distance commands with ACLs.

7. What is the correct interpretation of the routing table entry: O IA 10.10.0.0/16 [110/128] via 172.16.1.1?

Correct answer is D. Breaking down the entry: O = OSPF, IA = inter-area (route learned from a different OSPF area via an ABR), [110/128] = AD 110 / cost (metric) 128, via 172.16.1.1 = next-hop IP address. The bracket always reads [AD/metric] — first number is always AD, second is always the protocol's metric.

8. A network has dual ISPs. ISP1 is connected via eBGP (AD 20). ISP2 is connected via a static default route. The engineer wants ISP1 to be primary and ISP2 to be backup. Which static route command correctly implements the backup?

Correct answer is A. eBGP has AD 20. For ISP2 static to be backup, its AD must be greater than 20. AD 21 (or any value 21–254) makes the static float above eBGP — ISP1's eBGP route (AD 20) is preferred. Options B (AD 1), C (AD 19), and D (AD 10) are all lower than 20 — they would override the eBGP route and make ISP2 the primary, which is the opposite of the requirement.

9. Which command would you use to verify whether a floating static route is currently suppressed (not in the table because the primary route is active) or active?

Correct answer is C. The routing table (show ip route) only shows installed routes — the winning route after AD comparison. If the primary dynamic route (e.g., OSPF) is present, the floating static does not appear at all. If the floating static appears in show ip route, it means the primary dynamic route is gone and the floating static has taken over. There is no separate command to see "suppressed" static routes — their absence from the table confirms suppression.

10. A router is redistributing OSPF routes into EIGRP. Another router in the EIGRP domain also runs OSPF directly. For the redistributed prefix 172.20.0.0/24, which route does the second router install — OSPF-learned (AD 110) or EIGRP external redistributed (AD 170)?

Correct answer is B. This is one of the most important AD relationships to understand in redistribution scenarios. EIGRP external routes have AD 170 — significantly higher than OSPF's 110. So if a router receives the same prefix from both OSPF (AD 110) directly and as an EIGRP external route (AD 170), OSPF wins. This behaviour is intentional — it prevents routing loops during mutual redistribution and ensures directly- learned OSPF routes are preferred over once-redistributed copies.

← Back to Home