Metric
Cheat sheet · https://pcornel.dk/topic.php?topic=1067
Answer
Metrics rank candidate paths according to a protocol’s own algorithm. OSPF cost, EIGRP composite metric and BGP attributes have different semantics and scales.
Remember
First identify route source and same-prefix candidates. AD/source selection and longest-prefix match are separate from the protocol-specific metric calculation.
First checks
show ip route <prefix>— [AD/metric]show ip route <prefix> | include metric— metric detail
Commands
show ip route
Verify in this order
candidate paths → AD compared → metric compared → best route
Where it usually breaks
underlay/interface reachability → protocol adjacency/session → received/originated state → policy → best path/RIB → FIB/adjacency → traffic path
Metric operational reference
| Check | Known-good | Failure signature | Next boundary |
|---|---|---|---|
| Route source | Protocol identified | Metric read without source | Context |
| Candidate set | Same protocol/prefix | Cross-protocol numbers compared | Selection stage |
| Inputs | Expected cost/attributes | Unexpected component | Protocol metric |
| RIB | Chosen source/path installed | Different source wins | AD/policy |
| Forwarding | Expected next hop used | RIB/FIB mismatch | FIB |
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=1067