How does a routing protocol pick the "best path", and how is a metric different from administrative distance?
A metric is a quantitative measure of distance to a network — within one protocol, the path with the lowest metric wins. Administrative distance (AD) is different: it ranks the trust between protocols, deciding which source's route to install when two protocols both know the destination.
* AD selects the source, then the metric selects the path. *
The two values answer two different questions, and it helps to see them in order:
- Metric — "which path is best within one protocol?" Each protocol measures distance its own way, so metrics from different protocols are not comparable:
| Protocol | Metric | How it's measured |
|---|---|---|
| RIP | Hop count | Each router adds 1 hop; max 15 (16 = unreachable) |
| OSPF | Cost | Cumulative bandwidth along the path — faster links cost less |
| EIGRP | Composite | Based on the slowest bandwidth + delay (optionally load/reliability) |
- Administrative distance — "which protocol do I believe?" Because RIP's "5 hops" and OSPF's "cost 50" can't be compared directly, the router first uses AD to pick the most trustworthy source (lower AD = more trusted), installs that protocol's route, and only then uses that protocol's metric to choose among its own paths.
So the order is: AD selects the winning route source → the metric selects the best path within it. A directly connected route (AD 0) beats a static route (AD 1) beats OSPF (AD 110) beats RIP (AD 120) regardless of metric — AD is decided first.
Tip: AD is who you trust; metric is how far it is according to that source. Mixing them up ("RIP's 15 hops beats OSPF") is a classic exam trap — the protocols never compare metrics across the boundary.
Go deeper:
Routing metric (Wikipedia) — how routers rank feasible routes by path length, bandwidth, delay, and more.
Administrative distance (Wikipedia) — the trust ranking that picks the source before any metric is compared.