Pcornel
Browse topics
Options
Recent
Favorites
Networking · Technical reference

Administrative Distance · RIB / FIB / CEF

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
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.

3 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 RIB/FIB/CEF / AD: interpret mismatched layers Verify boundary
ObservationInterpretationNext check
Desired protocol candidate exists but another source owns the exact prefixPossible source preference or eligibility decisionActual AD, protocol selection and RIB winner
RIB route exists, CEF next hop is unresolved/incompleteRoute selection alone has not established usable adjacencyRecursive route, ARP and link/VLAN
Software CEF looks correct, packets failDownstream policy, return path or hardware programming may differEgress counters, platform readback and peer observation
Different destinations take different overlapping prefixesMay be correct longest-prefix behaviorExact 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 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.
ReferenceImportant terms & boundaries3 sections · depth on demand

Key points

  • AD is local to one router and is not advertised as a packet field
  • AD does not compare different prefix lengths
  • AD is not the same as OSPF cost, EIGRP metric, BGP attributes or route tag
  • Common defaults vary by source; verify the live platform/configuration before relying on memorized values.

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 fromInstalledDistances
Static and OSPFStatic1 vs 110
EIGRP internal and OSPFEIGRP90 vs 110
eBGP and OSPFeBGP20 vs 110
iBGP and OSPFOSPF200 vs 110
Floating static (250) and EIGRPEIGRP250 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)

CommandUse
distance eigrp 80 100Change EIGRP internal and external distances
distance 90 ip under IS-ISPrefer IS-IS IP routes over the default 115
distance 255Ignore routes from unlisted sources
Distance argument on ip routeFloating 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.

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

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.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.
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 → 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%
Terminology layer

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.

Aliases that resolve here
ADadmin distance
Depth when you need it

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.

Confirmation

Confirm action

Continue?