Use it when a protocol prefers the wrong path, or traffic is not shared across links that should be equal.
Metric · Forwarding Decision
1. show ip route <prefix> — which next hops, with which metric?
2. Wrong path → compare the metric along both paths (cost per interface).
3. Expected ECMP missing → the metrics differ slightly; compare them hop by hop.
4. Adjust the cost or delay on the interface, consistently.
5. Check the route again.
Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
show ip route 10.1.1.0Verification & 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 Commands Verify boundary
show ip route 10.1.1.0 ! [AD/metric] in brackets
show ip ospf interface brief ! OSPF cost per interface
show ip eigrp topology 10.1.1.0/24
Step 2 Common mistakes Narrow the fault
- Comparing metrics from different protocols.
- OSPF reference bandwidth left at 100 Mb/s, so all fast links cost 1.
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.
Metrics are compared only within one protocol; across protocols, administrative distance decides. OSPF cost comes from interface bandwidth — set auto-cost reference-bandwidth the same on all routers. Equal-cost paths appear as several next hops for one prefix.
ReferenceHow it works1 section · depth on demand
What it is
A metric is the routing protocol's cost for a path; the lowest metric wins among routes from the same protocol for the same prefix. Metrics are not comparable between protocols — that is what administrative distance is for.
ReferenceImportant terms & boundaries3 sections · depth on demand
In depth
Metric in the forwarding decision
The metric chooses between paths that one protocol knows for the same prefix. If several paths tie, they're all installed and the router load-shares. Cisco's IOS XE routing guide says most IP routing protocols install up to four parallel routes by default, static routes up to six and BGP one, adjustable with maximum-paths; traffic-share min restricts forwarding to the minimum-metric paths.
Where the metric fits
| Decision | Uses |
|---|---|
| Which protocol's route is installed | Administrative distance |
| Which path within that protocol | Metric |
| Which installed route matches a packet | Longest prefix match |
| Which equal path a flow takes | CEF load-sharing hash |
Equal-cost multipath example
R1# show ip route 10.60.0.0
Routing entry for 10.60.0.0/16
Known via "ospf 1", distance 110, metric 3, type intra area
Routing Descriptor Blocks:
* 10.0.12.2, from 10.255.0.2, via GigabitEthernet0/0/1
Route metric is 3, traffic share count is 1
10.0.13.2, from 10.255.0.3, via GigabitEthernet0/0/2
Route metric is 3, traffic share count is 1
R1(config)# router ospf 1
R1(config-router)# maximum-paths 8
R1# show ip cef exact-route 10.10.0.25 10.60.4.9
10.10.0.25 -> 10.60.4.9 =>IP adj out of GigabitEthernet0/0/2, addr 10.0.13.2
Unequal paths
| Protocol | Unequal-cost support |
|---|---|
| OSPF | No: only equal-cost paths |
| EIGRP | Yes, with variance; traffic shared in proportion to metric |
| BGP | Not by default; options such as maximum-paths with multipath relaxations |
Changing which path wins
| Protocol | Lever |
|---|---|
| OSPF | ip ospf cost per interface |
| EIGRP | Interface delay (preferred over bandwidth) |
| Static | Several static routes with different distances |
Load sharing is per flow by default, so a single flow always uses one path.
Documented example, not captured output.
Quick reference
A router can learn the same destination from several sources, and it uses two different numbers to choose. Within one routing protocol, the metric decides which path is best. Between different protocols, administrative distance decides which source is trusted most, because their metrics cannot be compared. Understanding both explains most "why is the router using this path?" questions, and it is also the basis for backup routes that only take over when the primary disappears.
Metrics rank routes within the same protocol; administrative distance ranks between protocols.
| Protocol | Metric | AD |
|---|---|---|
| Connected / static | — | 0 / 1 |
| eBGP | Path attributes | 20 |
| EIGRP | Bandwidth + delay | 90 (internal) |
| OSPF | Cost | 110 |
| IS-IS | Metric | 115 |
| RIP | Hop count | 120 |
| iBGP | Path attributes | 200 |
Equal-metric paths are installed for ECMP (maximum-paths). Floating static routes use a higher AD than the dynamic protocol to act as backup.
Metrics by protocol
| Protocol | Metric |
|---|---|
| RIP | Hop count (max 15) |
| OSPF | Cost = reference bandwidth ÷ interface bandwidth |
| EIGRP | Bandwidth + delay (by default) |
| IS-IS | Interface metric (default 10) |
| BGP | No single metric; path attributes (MED is one) |
Equal metrics give ECMP (maximum-paths).
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 → Forwarding Decision → 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%