Routing

Administrative Distance and Metrics

Learn how routers compare route candidates, distinguish administrative distance from metrics, and understand how redistribution, default routes, and parallel paths affect route selection.

Intermediate12 min read
Routing lessonNetworkingLearn

Learn how routers compare route candidates, distinguish administrative distance from metrics, and understand how redistribution, default routes, and parallel paths affect route selection.

What you will be able to do

  • Explain the different jobs of administrative distance and routing metrics when a router compares route candidates.
  • Determine why a route with the lowest administrative distance is preferred among routes learned through routing protocols.
  • Describe how changing a static route's administrative distance can allow a dynamic route to take precedence.
  • Explain why metrics may require translation or a configured default metric during redistribution.

01

Why routers compare routes

A router may know more than one way to reach a destination. It examines those route candidates and chooses the best available path instead of treating every candidate as equally suitable.

Administrative distance and metrics are two comparison tools used during that decision. Cisco software also uses them when determining a default route, sometimes called the gateway of last resort.

02

What administrative distance means

Administrative distance expresses how much preference a router gives to routing information learned from a particular source. It can compare information learned through different routing protocols and can also rate information learned from devices using the same protocol.

Each dynamic routing protocol has a default administrative distance. When the device compares routes learned through routing protocols, it selects the route associated with the lowest administrative distance.

03

What a metric means

A metric is a protocol's value for comparing paths within its own routing decision process. It helps a router distinguish among candidate paths that the protocol considers comparable.

Administrative distance and metric answer different questions. Administrative distance helps choose between sources of routing information, while a metric helps compare paths according to a protocol's rules.

04

A route-selection example

Imagine that a destination is reachable through two dynamic routing protocols. If one protocol has the lower administrative distance, the router prefers that protocol's route before using the other route's metric to settle the comparison.

Now imagine two paths supplied by the same protocol. The protocol's metric can distinguish those paths. This example shows why a metric should not be treated as a universal score shared by every routing protocol.

05

Changing a route's preference

A static route normally participates in the same route-source comparison as dynamic information. To let a dynamic route override a static route, configure the static route with a higher administrative distance.

The contrast is deliberate: lowering a route's administrative distance increases its preference, while raising the static route's value makes the dynamic source more preferred. This changes source selection, not the meaning of the dynamic protocol's metric.

06

Moving routes between protocols

A metric produced by one routing protocol does not necessarily have a direct meaning in another protocol. A value that ranks paths in one protocol may not provide a useful ranking after the route crosses into a different protocol.

Supported metric translations describe automatic conversions between routing protocols. Another option is to configure a default metric, which allows a protocol to redistribute routes learned from another protocol.

07

An OSPF redistribution detail

When routes are redistributed between OSPF processes, the original OSPF metrics are not preserved. The receiving process therefore does not simply reuse the source process's metric values.

This is a useful contrast with a direct in-protocol comparison. Redistribution crosses a protocol boundary, so the receiving process needs the configured or translated information available to it.

08

Passing a default route

OSPF can originate network 0.0.0.0 as the default route with a type 2 metric of 5 when the stated condition for that behavior is met. The metric belongs to how OSPF advertises that default information.

When dynamic routing passes default information, separate gateway-of-last-resort configuration is unnecessary. The routing information itself supplies the default path to devices that receive it.

09

Other selection rules to remember

Most IP routing protocols install up to four parallel routes by default. This describes how many equal usable paths may be installed, not how administrative distance and metrics are defined.

Route selection can also account for reliability. A route with higher reliability is selected over one with lower reliability, regardless of their routing metrics.

Protocols without TOS support receive TOS zero for their learned routes. TOS zero is the default TOS value.

10

Recap: prepare to Practice and Prove

Administrative distance compares the preference of route sources, including dynamic routing protocols. A lower administrative distance wins when the device compares routes learned through routing protocols.

A static route normally participates in the same route-source comparison as dynamic information. To let a dynamic route override a static route, configure the static route with a higher administrative distance.

A metric produced by one routing protocol does not necessarily have a direct meaning in another protocol. A value that ranks paths in one protocol may not provide a useful ranking after the route crosses into a different protocol.

When routes are redistributed between OSPF processes, the original OSPF metrics are not preserved. The receiving process therefore does not simply reuse the source process's metric values.

NEXT STEP

Turn reading into recall

Practice the concepts without a timer, with coaching and retry available after every answer.

Open guided practice