When there are multiple routes to the same destination, a router must have a mechanism for calculating
the best path. A metric is a variable assigned to routes as a means of ranking them from best to worst or
from most preferred to least preferred. Consider the following example of why metrics are needed.
Assuming that information sharing has properly occurred in the internetwork of Figure 4.1, router A
might have a route table that looks like Table 4.1.
Table 4.1. A rudimentary route table for router A of Figure 4.1.
Network Next-Hop Router
192.168.1.0 Directly connected
192.168.2.0 Directly connected
192.168.3.0 Directly connected
192.168.4.0 B, C
192.168.5.0 B, C
192.168.6.0 B, C
192.168.7.0 B, C
This route table says that the first three networks are directly connected and that no routing is needed
from router A to reach them, which is correct. The last four networks, according to this table, can be
reached via router B or router C. This information is also correct. But if network 192.168.7.0 can be
reached via either router B or router C, which path is the preferable path? Metrics are needed to rank the
alternatives.
NOTE
The "best" or "shortest" route is the most preferred route according to a particular protocol's metric.
Different routing protocols use different, and sometimes multiple, metrics. For example, RIP defines the
"best" route as the one with the least number of router hops; IGRP defines the "best" route based on a
combination of the lowest bandwidth along the route and the total delay of the route. The following
sections provide basic definitions of these and other commonly used metrics. Further complexities—such
as how some routing protocols use multiple metrics and deal with routes that have identical metric
values—are covered later, in the protocol-specific chapters of this book.