Pcornel
Networking · Routing › Routing Table

Metric

Cheat sheet · https://pcornel.dk/topic.php?topic=1067

Back to the Topic

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

CheckKnown-goodFailure signatureNext boundary
Route sourceProtocol identifiedMetric read without sourceContext
Candidate setSame protocol/prefixCross-protocol numbers comparedSelection stage
InputsExpected cost/attributesUnexpected componentProtocol metric
RIBChosen source/path installedDifferent source winsAD/policy
ForwardingExpected next hop usedRIB/FIB mismatchFIB

Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=1067

Confirmation

Confirm action

Continue?