Pcornel
Networking · Routing › RIB / FIB / CEF

Administrative Distance

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

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

show ip route <destination>
show ip cef <destination>
show ip cef exact-route <source> <destination>
show ip arp <next-hop>
ip route

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

wrong RIB owner → unresolved recursion/adjacency → forwarding programming discrepancy → policy/remote service/return route

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

Confirmation

Confirm action

Continue?