Octet

What is administrative distance, and what are the default values on a Cisco router?

Show the answer

Say this first

Administrative distance is how much the router trusts a source of routing information. When two sources offer the same prefix, the lower AD is installed. It is local to the router and is never advertised. Connected 0, static 1, EIGRP summary 5, eBGP 20, EIGRP internal 90, IGRP 100, OSPF 110, IS-IS 115, RIP 120, EIGRP external 170, iBGP 200, unknown 255 (never installed).

Go deeper

The full Cisco table

SourceAD
Connected interface0
Static route1
EIGRP summary (discard route on the summarizing router)5
eBGP20
EIGRP internal90
IGRP (obsolete)100
OSPF (intra-area, inter-area and external alike)110
IS-IS115
RIP120
ODR (On-Demand Routing)160
EIGRP external170
iBGP and locally originated BGP aggregates200
Default route learned with ip address dhcp254
Unknown or untrusted255

Details people get wrong

  • A static route that names only an exit interface shows is directly connected in the table, but its AD is still 1. show ip route for it says distance 1, metric 0 (connected).
  • OSPF gives the same 110 to every route type by default. You can split them with distance ospf intra-area 110 inter-area 110 external 120.
  • AD 255 means the route is never installed. Setting a static route to 255 is a way to keep it in the config but out of the table.

Other vendors

Junos calls it route preference: direct 0, static 5, OSPF internal 10, IS-IS level 1 internal 15, level 2 internal 18, RIP 100, OSPF external 150, BGP 170 (the same for iBGP and eBGP). The idea is identical, the numbers are not, which matters when you mix vendors and redistribute.

Traps

  • Saying a static route to an interface has AD 0. It is 1; it is only displayed as directly connected.
  • Forgetting EIGRP external 170. It is the value behind most redistribution surprises with OSPF.
  • Quoting Junos and Cisco numbers as if they were the same table.
How did you do?Book 3.4 Routing