Pcornel
Browse topics
Options
Recent
Favorites
Networking · Technical reference

Administrative Distance · Routing Table

Direct answer

Administrative distance is how much a router trusts a route source. When two sources offer the same prefix, the lower distance wins: connected 0, static 1, eBGP 20, EIGRP 90, OSPF 110, RIP 120, iBGP 200.

When to use this

Use it when the same prefix is learned from two sources and the wrong one is used — typically a static route overriding a routing protocol, or redistribution loops.

First 30 seconds

1. show ip route <prefix> — which source won, at which distance?

2. Check the other source has the same prefix (same length), not a longer or shorter one.

3. Static winning over a protocol unintentionally → give it a higher distance (floating static) or remove it.

4. Redistributed route winning → check distances on both sides of the redistribution.

5. Verify again with show ip route <prefix>.

Operational verification

same prefix offered by several sources → lowest administrative distance installed → others kept in their protocol databases → winner forwards → loser takes over if the winner disappears

Context & applicabilityCommon mistakes · platform/version boundaries
Platform / version applicability
Cisco IOS / IOS XE
applies
Structured applicability is explicit Topic metadata; it does not infer compatibility beyond the stored rows.
At a glance

Operational reference

Fast context before you go deeper.

PlatformCisco IOS / IOS XE · Cisco IOS XE · IOS/IOS XE
Key commandip route 203.0.113.0 255.255.255.0 198.51.100.2 200
Scope / prerequisiteUse it when the same prefix is learned from two sources and the wrong one is used — typically a static route overriding…
What next?3 suggested next steps
Evidence1
On this pageJump to a specific section
Operational workflow

Verification & Troubleshooting

Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.

4 steps Observe → verify → isolate → change minimally → repeat the original test.
ObservedRecord what the original test actually shows

Capture the concrete output, symptom, packet, log or counter before changing anything.

Step 1 Floating static: isolated failover lab Verify boundary

Authored lab assumptions: R1 reaches its OSPF primary peer 192.0.2.2 over an independent 192.0.2.0/30 link. A separate connected backup link reaches 198.51.100.2 in 198.51.100.0/30. Both peers have a valid path to test subnet 203.0.113.0/24 and a return path to the test source. The primary learns that exact /24 through OSPF at default AD 110; there is no competing more-specific route or other lower-AD source for it.

On R1 only, after validating the topology and saving prior configuration:

ip route 203.0.113.0 255.255.255.0 198.51.100.2 200

This is configuration, not observation. Initially read show ip route 203.0.113.0 255.255.255.0: the OSPF candidate should win. In an isolated failure test, disable only the primary lab link. After OSPF withdrawal/convergence, the static should install via the independently reachable backup next hop. Verify show ip cef 203.0.113.42 and sourced traffic in both directions.

Restore the exact prior primary-interface state; OSPF should regain the /24 after adjacency/convergence. Restore/remove only the test static according to its saved prior state. Expected results are illustrative, not executed router observations.

Step 2 AD failure diagnosis: missing candidate versus bad backup Narrow the fault

If the floating static is active during normal operation, inspect the primary protocol's exact prefix, policy, eligibility and actual configured AD. A primary /16 does not compete with a backup /24 for the same RIB entry. If the backup never installs, inspect its exact prefix/mask, AD and recursive next-hop reachability after the primary disappears.

A floating static is not an end-to-end health probe. If the primary route remains eligible while a downstream service fails, AD alone will not switch traffic. Tracking/BFD/IP SLA designs require separate failure detection and platform-specific scope; do not add them implicitly to this simple lab.

Negative reasoning test: leave both eligible /24 candidates present and send traffic matching a separately installed more-specific /25. That packet can take the /25 regardless of the /24's AD. Changing the /24 AD cannot reverse this longest-prefix lookup. See the worked packet example in [Forwarding Decision / AD](topic.php?topic=1071&view=deep).

Do not tune AD to conceal a missing route advertisement, broken next-hop recursion or policy error. Capture protocol candidate, selected RIB route and forwarding observations for the same time window.

Step 3 AD closure and proof limits Narrow the fault

For the exact /24 lab, document three states: normal OSPF ownership, primary withdrawal with backup-static ownership, and restoration of OSPF ownership. At each step record route source, displayed AD/metric, next hop, CEF result and sourced traffic/return path. A bracketed route value such as [110/20] means AD 110 and that source's metric 20; it does not make metric 20 comparable to another protocol's metric.

An installed backup is not evidence that its next hop can reach the destination; verify the remote path and original service separately. A configuration rollback does not instantly restore adjacency or forwarding state; allow and observe convergence.

Preserve canonical Topic identities, related content and historical verification records. The examples use documentation addresses and authored expected outcomes; they are not a device capture, an executed failover test or new Evidence. Use a real independently reachable backup path before attempting a live failover.

Step 4 Common mistakes Narrow the fault
  • Changing AD to fix a prefix-length problem.
  • Different AD defaults on different vendors.
Evidence references

Evidence · 1 on this Topic

Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.

observation · 1
Command lookup Jump straight to Cisco syntax
Key points

Distance only compares identical prefixes; a longer prefix still wins. Only the winner enters the routing table; the loser waits in its own protocol database. A floating static route uses a distance higher than the protocol so it only appears when the protocol route disappears.

Key checks
  • show ip route <prefix> — the installed route with its distance and metric: [110/20].
  • show ip protocols — distances configured per protocol.
  • show ip ospf database, show ip eigrp topology <prefix>, show bgp ipv4 unicast <prefix> — the route the loser still knows.
  • show running-config | include ip route — static routes and their distances.
ReferenceHow it works1 section · depth on demand

Quick reference

Administrative distance (AD) ranks how much a router trusts each route source. When several sources offer the same prefix and length, the route with the lowest AD is installed; metrics are only compared within one source.

SourceDefault AD
Connected0
Static1
eBGP20
EIGRP internal90
OSPF110
IS-IS115
RIP120
EIGRP external170
iBGP200
Unusable255

Raising a static route's AD above the IGP's makes it a floating backup.

ReferenceImportant terms & boundaries2 sections · depth on demand

In depth

Administrative distance in the routing table

Administrative distance (AD) ranks route sources by trustworthiness when several sources offer the same prefix with the same length. Lower wins. Cisco's IOS XE routing guide lists the defaults below and notes that 255 means the source isn't trusted at all and its routes are ignored.

Default distances (routing guide)

SourceDistance
Connected0
Static1
EIGRP summary5
eBGP20
Internal EIGRP90
OSPF110
IS-IS115
RIP120
iBGP200
Unknown255
R1# show ip route 10.70.0.0
Routing entry for 10.70.0.0/16
  Known via "ospf 1", distance 110, metric 21, type intra area
R1# show ip protocols | include Distance|Routing Protocol
Routing Protocol is "ospf 1"
  Distance: (default is 110)
Routing Protocol is "eigrp 100"
  Distance: internal 90 external 170

Changing distances (routing guide)

CommandEffect
distance eigrp 80 100Internal and external EIGRP distances
distance 255Default for sources not otherwise matched: ignore them
distance <ad> <source-ip> <wildcard> [acl]Per neighbour or prefix list
ip route ... 130A static route with a chosen distance (floating static)

Where AD matters and where it doesn't

SituationDecider
Same prefix and length from OSPF and EIGRPAD (EIGRP 90 wins)
/24 from OSPF and /16 from EIGRPPrefix length (the /24), not AD
Two OSPF paths to one prefixOSPF cost, not AD

The guide also notes that distance no longer sets route weights; use route maps for that.

Documented example, not captured output.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.

Administrative Distance: select the source for one exact prefix

Scope: Cisco IOS / IOS XE, global IPv4 unicast RIB. This Topic owns route-source preference for the same network and mask. [Forwarding Decision / AD](topic.php?topic=1071&view=deep) explains packet longest-prefix lookup; [RIB/FIB/CEF / AD](topic.php?topic=2604&view=deep) follows the selected route into forwarding.

First establish eligible candidates for one exact prefix. AD is a local source preference; smaller values normally win between competing sources. Protocol metrics select paths inside their own domains and must not be compared numerically across OSPF, EIGRP or BGP. Source-specific rules and next-hop eligibility still matter.

Illustrative candidates for 203.0.113.0/24: an OSPF route at default AD 110 and a floating static at configured AD 200. If both are eligible, OSPF owns that RIB prefix. A configured candidate need not appear in show ip route while it loses; inspect the originating protocol table and static configuration separately.

Reference: Cisco administrative distance.

Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Technical verification history

Verification history & basis

When and against what this Topic was checked. Later text edits do not count as a new check.

2026-09-14 · vendor docCisco IOS / IOS XE Current documentation reviewed 2026-09-14

Authoritative/upstream documentation reviewed for bounded claims in Routing → Routing Table → Administrative Distance. Documentation verification only; this is not observed lab or production Evidence.

Basis: https://www.cisco.com/c/en/us/support/ios-nx-os-software/ios-xe-17/series.html · confidence 94%
Embedded reference data

Quick lookup tables

Administrative Distance operational reference

Topic-specific bounded interpretation: known-good state, suspicious signatures and the next technical proof boundary.

CheckKnown-goodFailure signatureNext boundary
PrefixExact same destination prefixDifferent masks comparedScope error
CandidatesEligible sources enumeratedConfigured-only candidate assumedEligibility
ADIntended lower value winsUnexpected source preferenceRIB policy
MetricCompared only within protocol rulesCross-protocol numeric compareMetric semantics
FailoverHigher-AD backup activatesAlways/never activeFloating design
Confirmation

Confirm action

Continue?