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.
Administrative Distance · Routing Table
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.
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>.
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
Operational reference
Fast context before you go deeper.
ip route 203.0.113.0 255.255.255.0 198.51.100.2 200Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
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 · 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.
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.
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.
| Source | Default AD |
|---|---|
| Connected | 0 |
| Static | 1 |
| eBGP | 20 |
| EIGRP internal | 90 |
| OSPF | 110 |
| IS-IS | 115 |
| RIP | 120 |
| EIGRP external | 170 |
| iBGP | 200 |
| Unusable | 255 |
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)
| Source | Distance |
|---|---|
| Connected | 0 |
| Static | 1 |
| EIGRP summary | 5 |
| eBGP | 20 |
| Internal EIGRP | 90 |
| OSPF | 110 |
| IS-IS | 115 |
| RIP | 120 |
| iBGP | 200 |
| Unknown | 255 |
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)
| Command | Effect |
|---|---|
distance eigrp 80 100 | Internal and external EIGRP distances |
distance 255 | Default for sources not otherwise matched: ignore them |
distance <ad> <source-ip> <wildcard> [acl] | Per neighbour or prefix list |
ip route ... 130 | A static route with a chosen distance (floating static) |
Where AD matters and where it doesn't
| Situation | Decider |
|---|---|
| Same prefix and length from OSPF and EIGRP | AD (EIGRP 90 wins) |
| /24 from OSPF and /16 from EIGRP | Prefix length (the /24), not AD |
| Two OSPF paths to one prefix | OSPF cost, not AD |
The guide also notes that distance no longer sets route weights; use route maps for that.
Documented example, not captured output.
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
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
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%Quick lookup tables
Administrative Distance operational reference
Topic-specific bounded interpretation: known-good state, suspicious signatures and the next technical proof boundary.
| Check | Known-good | Failure signature | Next boundary |
|---|---|---|---|
| Prefix | Exact same destination prefix | Different masks compared | Scope error |
| Candidates | Eligible sources enumerated | Configured-only candidate assumed | Eligibility |
| AD | Intended lower value wins | Unexpected source preference | RIB policy |
| Metric | Compared only within protocol rules | Cross-protocol numeric compare | Metric semantics |
| Failover | Higher-AD backup activates | Always/never active | Floating design |