Use it when two paths from the same routing domain select unexpectedly, when interpreting [AD/metric] route output, or when someone tries to compare metric numbers across protocols.
Metric · Routing Table
candidate paths → AD compared → metric compared → best route
Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Operational verification and known-good state Verify boundary
Freeze one protocol and prefix. Inspect all valid paths known by that protocol and identify the exact inputs that produce their metrics or path-selection ranking. Confirm the protocol-selected path is exported to the RIB, then ensure RIB selection against other sources is understood separately. Follow the installed route into FIB/adjacency and test traffic. If changing interface cost or metric policy, verify at least one neighboring prefix so a broad tuning knob has not shifted more paths than intended.
Step 2 Failure signatures and troubleshooting branches Narrow the fault
Comparing an OSPF cost of 20 to an EIGRP metric of thousands is invalid; those numbers are not on a shared scale. A surprising route may also be caused by administrative distance or longer-prefix selection before the metric in question matters. Inside a protocol, unexpected metric can come from reference bandwidth/interface cost, EIGRP delay/bandwidth inputs, route redistribution seed metrics or policy. Do not tune metrics until the actual candidate set and selection stage are identified.
Step 3 When the problem is really fixed Narrow the fault
Show the intended protocol path wins for the target prefix for a documented metric reason, the RIB/FIB installs the expected next hop, and the original traffic follows that path. Recheck a related prefix after metric tuning and verify failover behavior if multiple paths are intentionally retained. Route output is observational Evidence only when captured; this Topic defines metric interpretation rather than asserting a live network’s value.
Step 4 Common mistakes Narrow the fault
- Comparing metrics across protocols.
- Manual metrics drifting from design.
Evidence · 1 on this Topic
Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.
First identify route source and same-prefix candidates. AD/source selection and longest-prefix match are separate from the protocol-specific metric calculation.
show ip route <prefix>— [AD/metric]show ip route <prefix> | include metric— metric detail
ReferenceHow it works1 section · depth on demand
Quick reference
A metric is a routing protocol's measure of path cost, used to choose the best path among routes from the same protocol. Metrics from different protocols cannot be compared, which is why AD exists.
| Protocol | Metric |
|---|---|
| OSPF | Cost (sum of interface costs, bandwidth-based) |
| EIGRP | Composite of bandwidth and delay |
| RIP | Hop count (max 15) |
| BGP | Path attributes, not a single metric (MED is one attribute) |
| Static | 0 |
When paths have equal metrics, routers install them all (up to maximum-paths) and load-share.
ReferenceImportant terms & boundaries2 sections · depth on demand
In depth
Metric in the routing table
The metric is the routing protocol's own cost for a route. It's the second number in the brackets of show ip route ([110/21] is distance 110, metric 21) and only compares routes from the same protocol. Cisco's IOS XE routing guide warns that metrics don't translate between protocols, so redistributed routes need an explicitly set metric.
Metrics by protocol
| Protocol | Metric | Based on |
|---|---|---|
| Connected, static | 0 | — |
| OSPF | Cost | Reference bandwidth divided by interface bandwidth, summed along the path |
| EIGRP | Composite | Bandwidth and delay by default |
| RIP | Hop count | Maximum 15 |
| BGP | MED (shown as metric) | Set by the neighbouring AS; one of many path attributes |
R1# show ip route 10.60.0.0
Routing entry for 10.60.0.0/16
Known via "ospf 1", distance 110, metric 21, type intra area
R1# show ip ospf interface brief
Interface PID Area IP Address/Mask Cost State Nbrs F/C
Gi0/0/1 1 0 10.0.12.1/30 1 P2P 1/1
Gi0/0/2 1 0 10.0.13.1/30 10 P2P 1/1
R1(config)# interface GigabitEthernet0/0/2
R1(config-if)# ip ospf cost 20
Metrics in redistribution (routing guide)
| Command | Purpose |
|---|---|
metric 10000 100 255 1 1500 on redistribute | EIGRP bandwidth, delay, reliability, load, MTU |
default-metric | Metric for all redistributed routes |
set metric in a route map | Metric per matched route |
Parallel paths
Routes with equal metrics are installed together (up to four by default for most protocols, per the guide); traffic-share min keeps only minimum-metric paths when unequal paths are allowed.
Reading a metric
A metric is meaningful only inside its protocol: an OSPF cost of 21 and an EIGRP metric of 3072 can't be compared. When protocols compete for one prefix, administrative distance decides.
Documented example, not captured output.
Mechanics and state ownership
The generic routing table often displays a metric next to administrative distance, but that metric is supplied by the route source and only has meaning under that source’s algorithm. OSPF primarily derives cost from interface costs along the path; EIGRP uses a composite metric based on configured K-values and path properties; BGP path selection relies on an ordered set of attributes rather than one directly comparable IGP cost. A lower numeric value may be better in one context but meaningless when compared to another protocol. The RIB receives a winner or candidates from each source and then applies local source preference rules.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in Routing → Routing Table → Metric. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://www.cisco.com/c/en/us/support/ios-nx-os-software/ios-xe-17/series.html · confidence 94%Quick lookup tables
Metric operational reference
Topic-specific bounded interpretation: known-good state, suspicious signatures and the next technical proof boundary.
| 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 |