← Module 03 · Layer 3: Network

Administrative Distance & Metrics

Two numbers that both sound like "how good is this route," used to answer two completely different questions.

Two different questions

Once longest prefix match (previous topic) has narrowed things down to routes for the exact same destination network, a router can still end up with more than one candidate: maybe a static route and an OSPF (Open Shortest Path First) route both claim to know how to reach 10.0.2.0/24. Two separate numbers resolve that, each answering a different question:

It's the difference between picking which map app to trust when two apps disagree about the best route, versus that one app's own opinion of which of its own suggested routes is fastest.

SourceDefault Administrative Distance
Directly connected0
Static route1
eBGP20
EIGRP (internal)90
OSPF110
RIP120
iBGP200

Using AD on purpose: The floating static route

Because a lower AD always wins, you can deliberately configure a static route with a higher AD than your dynamic protocol, so it sits unused and ignored under normal conditions. If the dynamic route ever disappears (a link fails, the protocol stops advertising it), that static route "floats" up into use automatically as a backup path, no manual intervention required.

THE MISTAKE THIS PREVENTS

Mixing up AD and metric leads to confusing troubleshooting: seeing a static route (AD 1) silently override an OSPF route (AD 110) to the same destination looks like a bug until you remember AD picks the trusted source first. The metric never even gets compared in that case.