Pcornel
Networking · Routing › Routing Table

Administrative Distance

Cheat sheet · https://pcornel.dk/topic.php?topic=1066

Back to the Topic

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.

Remember

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.

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

Commands

ip route ... 130
show ip route
show ip route 203.0.113.0 255.255.255.0
show ip cef 203.0.113.42

Verify in this order

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

Where it usually breaks

candidate absent/ineligible → unintended local preference → unresolved backup next hop → installed route with broken remote/return path

Administrative Distance operational reference

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

Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=1066

Confirmation

Confirm action

Continue?