What is Administrative Distance?
Learn what administrative distance is, default values per protocol, and how it differs from a routing metric, with examples.
Expected Interview Answer
Administrative distance (AD) is a per-protocol trust rating, typically 0-255, that a router uses to decide which source to believe when it learns a route to the same destination from two or more different routing protocols — the lower the AD, the more trusted the source.
When a router receives routes to the identical destination network from, say, both OSPF and RIP, it does not run both and merge results — it picks the single route from the protocol with the lower administrative distance and installs only that one in the routing table. Typical defaults are a directly connected interface at 0, a static route at 1, EIGRP internal at 90, OSPF at 110, and RIP at 120, though vendors can differ slightly and administrators can override the defaults. AD only matters between different sources for the same prefix; within a single protocol, the protocol’s own metric (cost, hop count, bandwidth) breaks ties, not AD. This distinguishes AD from a routing metric: AD decides which protocol to trust, while the metric decides which path within that protocol is best.
- Resolves conflicts when multiple protocols learn the same route
- Lets administrators express trust preference between sources
- Keeps only one best route per destination in the routing table
- Is distinct from and evaluated before a protocol internal metric
AI Mentor Explanation
Administrative distance is like a team trusting the on-field umpire's call over a spectator's shouted opinion when both claim to have seen the same boundary — the umpire's ruling (lower distance, more trusted) always overrides the spectator's (higher distance, less trusted), even if the spectator is technically correct. Only when there is no umpire call available does the team fall back to any other source. This trust ranking, not who shouted loudest or fastest, is exactly how a router picks between competing routing protocol sources.
Step-by-Step Explanation
Step 1
Multiple sources learn a route
A router receives routes to the same destination network from two or more different protocols or sources.
Step 2
Compare administrative distance
The router checks the AD value assigned to each source (e.g., static=1, OSPF=110, RIP=120).
Step 3
Install the lowest-AD route
Only the route from the protocol with the lowest AD is installed in the routing table.
Step 4
Metric breaks intra-protocol ties
If multiple routes come from the same protocol, its own metric (cost, hop count) decides the best path, not AD.
What Interviewer Expects
- Correct definition: trust rating between different route sources, lower is better
- Knows common default values (connected=0, static=1, OSPF=110, RIP=120)
- Distinguishes administrative distance from a routing protocol metric
- Understands AD only applies when comparing different sources for the same prefix
Common Mistakes
- Confusing administrative distance with a routing metric like hop count or cost
- Thinking a higher administrative distance means more preferred
- Assuming AD is used to compare routes within the same protocol
- Not knowing static routes can be given a higher AD to act as a floating backup
Best Answer (HR Friendly)
“Administrative distance is basically how much a router trusts one source of directions over another. If two different systems both claim to know the way to the same place, the router listens to whichever one it trusts more by default — for example, a manually configured route is trusted more than one learned automatically — and only falls back to the less-trusted source if the preferred one has no answer.”
Code Example
# Show the installed route and which protocol/source it came from
ip route show 10.0.0.0/8
# Example FRRouting output showing AD (distance) per route source
# vtysh -c "show ip route 10.0.0.0/8"
# Routing entry for 10.0.0.0/8
# Known via "ospf", distance 110, metric 20
# Known via "static", distance 1, metric 0
# -> static route wins because AD 1 < AD 110
# A floating static backup route is created by raising its AD above
# the primary dynamic protocol’s AD, e.g.:
# ip route add 0.0.0.0/0 via 192.0.2.1 metric 200Follow-up Questions
- What are the default administrative distances for common protocols?
- How does administrative distance differ from a routing protocol metric?
- What is a floating static route and how does AD make it work?
- Can administrative distance values be changed by an administrator?
MCQ Practice
1. What does a lower administrative distance mean?
A lower administrative distance indicates a more trusted route source; it is preferred over higher-AD sources.
2. What is the default administrative distance of a directly connected interface?
Directly connected interfaces have the lowest default administrative distance, 0, making them the most trusted.
3. Administrative distance is used to choose between what?
AD resolves which source to trust when different protocols advertise the same destination; a protocol metric handles ties within one protocol.
Flash Cards
What is administrative distance? — A trust rating (0-255) used to choose between routes to the same destination learned from different sources.
Lower AD means? — More trusted route source; it is preferred over higher-AD sources.
AD vs metric? — AD picks the trusted protocol source; the metric picks the best path within that protocol.
Common AD defaults? — Connected=0, static=1, EIGRP internal=90, OSPF=110, RIP=120.