Metric

📘 CCNA 200-301 v1.1

3.1 Interpret the components of routing table

3.1.f Metric

1. What is a Metric in Routing?

In routing, a metric is a value (a number) used by routers to choose the best path to reach a destination network when there are multiple possible routes.

You can think of a metric as a “score” or “cost” that helps the router decide which route is better or more efficient.

  • The lower the metric, the better the route.
  • The higher the metric, the less preferred the route.

Metrics are part of the routing table — they help routers determine the best path (also called the best route) among several available paths.


2. Why Do We Need Metrics?

Routers often learn about multiple routes to the same network:

  • One route could come from a static route.
  • Another route could come from a dynamic routing protocol (like RIP, OSPF, or EIGRP).

Each dynamic routing protocol uses its own way to calculate the metric.
The router will compare metrics (if from the same routing protocol) to choose the lowest metric path to forward packets.

If routes come from different routing protocols, the router uses Administrative Distance (AD) first to decide which routing source is more trusted — and then uses the metric within that protocol.


3. Where You See the Metric

When you use the command:

show ip route

You can see the metric value for each learned route.

Example:

R    192.168.10.0/24 [120/2] via 10.0.0.2, 00:00:12, GigabitEthernet0/0

Here:

  • R = Route learned by RIP.
  • 120 = Administrative Distance (AD)
  • 2 = Metric (hop count for RIP)

So the metric here tells us how “far” the destination network is based on RIP’s measurement system.


4. Metrics Used by Different Routing Protocols

Different routing protocols calculate metrics in different ways. Let’s go through them:

a) RIP (Routing Information Protocol)

  • Metric type: Hop count
  • Each router a packet passes through = 1 hop.
  • The lower the hop count, the better the route.
  • Maximum hops allowed: 15
    (16 = unreachable)

Example:

RIP route metric = 2 → 2 routers away

b) OSPF (Open Shortest Path First)

  • Metric type: Cost
  • Cost is based on the bandwidth (speed) of the link.
  • Formula (Cisco default): Cost = 100,000,000 / Interface Bandwidth (in bps) Example:
    • FastEthernet (100 Mbps) → Cost = 1
    • GigabitEthernet (1 Gbps) → Cost = 1 (minimum possible)
    • Serial link (1.544 Mbps) → Cost = 64
  • The router adds up the costs of all links along the path to get the total metric.
  • The lowest total cost is the best route.

c) EIGRP (Enhanced Interior Gateway Routing Protocol)

  • Metric type: Composite metric
  • EIGRP uses multiple factors to calculate its metric:
    • Bandwidth
    • Delay
    • (Optionally: Load and Reliability)

Formula (simplified default):

Metric = [(10^7 / lowest bandwidth) + cumulative delay] * 256
  • This makes EIGRP more accurate and flexible than RIP or OSPF.
  • The lower the EIGRP metric, the better the route.

d) BGP (Border Gateway Protocol)

  • Metric type: Path attributes
  • BGP doesn’t use a single numeric metric like others. Instead, it uses multiple path selection attributes, such as:
    • Weight (Cisco-specific)
    • Local Preference
    • AS-Path length
    • MED (Multi-Exit Discriminator)
  • These attributes help BGP choose the best route between different autonomous systems.

5. Static Routes and Metrics

Even static routes can have a metric (optional):

ip route 192.168.10.0 255.255.255.0 10.0.0.1 10

Here, the 10 at the end represents the metric (also called administrative distance for static routes).
However, for static routes, this number is mostly used for backup routes, not for metric comparison between dynamic routes.


6. Key Point: Metric vs Administrative Distance

FeatureMetricAdministrative Distance (AD)
PurposeChooses best path within the same routing protocolChooses best route between different routing protocols
Smaller is better?YesYes
Who decides it?Each routing protocol defines its own methodCisco defines fixed default values (can be changed)
ExampleRIP: hop count 2 vs 3 → pick 2RIP AD 120 vs OSPF AD 110 → pick OSPF

7. Summary Table of Metrics

Routing ProtocolMetric TypeBest Path Based On
RIPHop countFewest routers (hops)
OSPFCostHighest bandwidth / Lowest total cost
EIGRPComposite metricBandwidth + Delay (optionally Load, Reliability)
BGPPath attributesPolicy-based decision (AS path, local pref, etc.)

8. Why Metrics Matter in Real IT Networks

In enterprise networks:

  • Routers use metrics to balance traffic, avoid slow links, and select optimal routes.
  • Network engineers may manually adjust metrics (called tuning metrics) to control which path traffic takes.
  • For example, if two WAN links connect the same branch and HQ, the network admin might adjust OSPF cost to make one path primary and the other backup.

In summary for the CCNA exam:

  • Metric = Value to determine best path within a routing protocol.
  • Lower metric = Better route.
  • Each routing protocol uses its own metric type (hop count, cost, bandwidth/delay, etc.).
  • Used only after the routing source (AD) has been selected.

Leave a Reply

Your email address will not be published. Required fields are marked *

Buy Me a Coffee