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 · RIB / FIB / CEF
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.
Verification & 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 RIB/FIB/CEF / AD: interpret mismatched layers Verify boundary
| Observation | Interpretation | Next check |
|---|---|---|
| Desired protocol candidate exists but another source owns the exact prefix | Possible source preference or eligibility decision | Actual AD, protocol selection and RIB winner |
| RIB route exists, CEF next hop is unresolved/incomplete | Route selection alone has not established usable adjacency | Recursive route, ARP and link/VLAN |
| Software CEF looks correct, packets fail | Downstream policy, return path or hardware programming may differ | Egress counters, platform readback and peer observation |
| Different destinations take different overlapping prefixes | May be correct longest-prefix behavior | Exact destination lookup for each |
For ECMP, a CEF path/hash observation for one source/destination pair does not show every flow uses that member. AD is not a packet field used by the next router. Keep local route-source selection separate from the downstream router's independent lookup. Illustrative interpretations are not device observations.
Step 2 RIB/FIB/CEF / AD: follow the installed route Narrow the fault
Scope: Cisco IOS / IOS XE global IPv4 unicast and ordinary destination-based forwarding. This Topic owns readback after source selection. See [Routing Table / AD](topic.php?topic=1066&view=deep) for source competition and [Forwarding Decision / AD](topic.php?topic=1071&view=deep) for longest-prefix examples.
1. Read show ip route <destination> to identify the matching installed prefix, source, displayed AD/metric and next hop.
2. If the expected source is missing, inspect its exact protocol candidate and policy; the RIB display alone does not enumerate all losing sources.
3. Read show ip cef <destination> for forwarding resolution. Where supported, use show ip cef exact-route <source> <destination> to inspect a source/destination-dependent path.
4. Resolve the selected next hop and inspect show ip arp <next-hop> on an Ethernet adjacency plus the egress interface. Hardware-specific readback may be needed beyond software CEF.
5. Repeat the original sourced application test and inspect its return route and filtering.
Do not clear CEF, ARP or routes merely to obtain an observation. Compare the same lookup context and time window.
Step 3 Common mistakes Narrow the fault
- Using AD to compare routes of different prefix lengths.
- Floating static AD below the dynamic protocol's AD.
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.
ReferenceImportant terms & boundaries3 sections · depth on demand
Key points
In depth
Administrative distance as the RIB's tie-breaker
When the RIB receives the same prefix with the same length from more than one source, administrative distance decides which one is installed. Cisco's IOS XE routing guide summarises the principle: lower values are preferred, a value of 255 means the source should be ignored, and a static route is overridden by a dynamic route whose distance is lower.
Common contests
| Same prefix from | Installed | Distances |
|---|---|---|
| Static and OSPF | Static | 1 vs 110 |
| EIGRP internal and OSPF | EIGRP | 90 vs 110 |
| eBGP and OSPF | eBGP | 20 vs 110 |
| iBGP and OSPF | OSPF | 200 vs 110 |
| Floating static (250) and EIGRP | EIGRP | 250 vs 90 |
R1# show ip route 172.20.0.0
Routing entry for 172.20.0.0/16
Known via "eigrp 100", distance 90, metric 28416, type internal
R1# show ip ospf database external 172.20.0.0 | include Link State ID
Link State ID: 172.20.0.0 (External Network Number )
R1# show ip route ospf | include 172.20
R1#
OSPF knows 172.20.0.0/16 too, but EIGRP's lower distance keeps it out of the RIB.
Tuning (routing guide)
| Command | Use |
|---|---|
distance eigrp 80 100 | Change EIGRP internal and external distances |
distance 90 ip under IS-IS | Prefer IS-IS IP routes over the default 115 |
distance 255 | Ignore routes from unlisted sources |
Distance argument on ip route | Floating static backups |
Mutual redistribution and distance
With redistribution at several points, a route can come back into the original protocol as external with a different distance and win over the internal route, causing suboptimal paths or loops. Filtering with tags or route maps, as the routing guide shows, prevents it.
Documented example, not captured output.
Quick reference
In the RIB/FIB/CEF context, administrative distance is applied when the RIB chooses which source's route to install for a prefix; only the winner is pushed to the FIB. Routes that lose on AD stay in their protocol's database (e.g. BGP shows them as RIB-failure).
show ip route 10.20.0.0 255.255.255.0
show bgp ipv4 unicast rib-failure
show ip cef 10.20.0.0/24
Documented example, not captured output.
If CEF forwarding does not match what a protocol shows as best, check whether another source with lower AD owns the prefix in the RIB.
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 → RIB / FIB / CEF → 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%Terms & aliases
Hover a linked term for a quick definition; click it to open its glossary entry. Aliases are other names that find this Topic in search.
Deep reference
Healthy vs suspicious evidence
RIB/FIB/CEF / AD: controlled readback and recovery
Use a previously reviewed route-change/failover lab, such as the [floating-static example](topic.php?topic=1066&view=deep). Before, during and after its controlled transition, capture the exact prefix's RIB owner, resolved CEF next hop, adjacency and original traffic outcome. Preserve timestamps and source address so observations from different convergence stages are not mistaken for a steady-state contradiction.
If software and hardware state disagree after expected convergence, collect the platform-supported readback and investigate the programming boundary. Do not repair a suspected stale state with a global clear before preserving evidence and assessing affected flows. Restore the exact route/interface policy change and repeat the lookup and traffic test after convergence.
This is a verification procedure, not a new claim that any production FIB, adjacency or packet path was tested. Existing Evidence and technical verification dates remain separate from authored content.