Professional Documents
Culture Documents
1. Prefix Length - The longest-matching route is preferred first. Prefix length trumps all other
route attributes.
2. Administrative Distance - In the event there are multiple routes to a destination with the
same prefix length, the route learned by the protocol with the lowest administrative distance
is preferred.
3. Metric - In the event there are multiple routes learned by the same protocol with same prefix
length, the route with the lowest metric is preferred. (If two or more of these routes have
equal metrics, load balancing across them may occur.)
Suppose a router receives a packet destined for the IP address 192.0.2.73. The router has in its
routing table the following three routes:
If you picked 172.16.3.1, you're correct. Why? A router evaluates routes in the following order.
1. Prefix Length - The longest-matching route is preferred first. Prefix length trumps all other
route attributes.
2. Administrative Distance - In the event there are multiple routes to a destination with the
same prefix length, the route learned by the protocol with the lowest administrative distance
is preferred.
3. Metric - In the event there are multiple routes learned by the same protocol with same prefix
length, the route with the lowest metric is preferred. (If two or more of these routes have
equal metrics, load balancing across them may occur.)
Following these rules, we can see that our RIP-learned route is preferred because it is the most
specific route: it has the longest matching prefix (26 bits in length compared to 25 and 24). These
rules hold true even when evaluating directly connected routes, which have an AD of zero:
Router# show ip route
* 172.16.3.2