Pcornel
Networking · Routing › Forwarding Decision

Administrative Distance

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

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 203.0.113.0 255.255.255.0
show ip route 203.0.113.0 255.255.255.128
show ip route 203.0.113.42
show ip route 203.0.113.200

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

expected prefix missing → different longest match → forwarding-policy exception → recursion/adjacency → egress/return path

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

Confirmation

Confirm action

Continue?