banner

Home | Routing Protocols | RIP | IGRP | EIGRP | Configuring EIGRP | Link State Protocols

Understand the significance of administrative distance and their metrics
when working with routers

When it comes to routing protocols and routes, administrative distance and metrics are two important factors.
What exactly do these numbers mean?

Most routing protocols have metric structures and algorithms that are not compatible with other protocols. In a network where multiple routing protocols are present, the exchange of route information and the capability to select the best path across the multiple protocols are critical.

Administrative distance is the feature used by routers to select the best path when there are two or more different routes to the same destination from two different routing protocols. Administrative distance defines the reliability of a routing protocol. Each routing protocol is prioritized in order of most to least reliable (believable) using an administrative distance value.

Being knowledgeable about these two aspects can make all the difference in network performance, reliability, and circuit selection.

If you are not familiar with administrative distance and metrics, you have probably seen them before and just not paid any attention to them. If you enter a show ip route command, you'll notice two numbers in brackets, listed directly after the route in the table. Here's an example of a routing table route learned via OSPF:

O 10.1.103.0/24 [110/791] via 10.1.100.2, 00:39:44, Serial1/0:0.21

In this case, 110 represents the administrative distance, and 791 signifies the metric. You can get more details by using the same show ip route command and specifying a single route. Here is an example:

Router# show ip route 10.1.103.0
  Routing entry for 10.1.103.0/24
  Known via "ospf 100". distance 110, metric 791, type intra area
  Last update from 10.1.100.2 on Serial1/0:0.21, 01:09:25 ago
  Routing Descriptor Blocks:
  * 10.1.100.2, from 172.16.1.1, 01:09:25 ago, via Serial1/0:0.21
    Route metric is 791, traffic share count is 1

But what exactly do these numbers mean? Let's take a closer look at each one.

Administrative distance
Administrative distance (AD) is how a router determines which source of routes it should use if it has two identical routes from different sources. In other words, the router needs to be able to determine which routes to trust if it's receiving the same information from two different sources. For a better idea, consider trying to decide which local news program, all of which more or less cover the same events, is most trustworthy.

If you only have one router with one routing protocol and one WAN circuit, or if you're only using static routes, administrative distance doesn't affect your situation. But that doesn't mean you shouldn't be familiar with its purpose.

But if you have a slightly more complex network say - you have two WAN circuits or you're using two routing protocols (even if one of them is static routing) - administrative distance takes on more importance.

The sources of the routes aren't only routing protocols, such as RIP, OSPF, or BGP. Possible sources can also be connected routes (i.e., the interfaces on the router) and static routes (which you entered as network administrator).

The router determines which source is the most trustworthy (i.e., reliable) according to the administrative distance. The lower the administrative distance, the more trustworthy the routing source.

To help make this decision, routers contain a preprogrammed table that lists all of the possible sources and their default administrative distances. The table below is an example of what it looks like.

Administrative distance is the first criterion that a router uses to determine which routing protocol to use if two protocols provide route information for the same destination. It is a measure of the trustworthiness of the source of the routing information. Keep in mind that administrative distance has only local significance; it is not advertised in routing updates.

Note: The smaller the administrative distance value, the more reliable the protocol. For example, if a router receives a route to a certain network from both Open Shortest Path First (OSPF) (default administrative - 110) and Interior Gateway Routing Protocol (IGRP) (default administrative distance - 100), the router will choose IGRP because it is more reliable. This means the IGRP version of the route would be added to the routing table.

If you lose the source of the IGRP - derived information (for example, because of a power shutdown), the software uses the OSPF - derived information until the IGRP - derived information reappears.

Default Distance Value Table
The table below lists the administrative distance default values of the protocols that Cisco supports.

SOURCE OF THE ROUTE DEFAULT DISTANCE
Connected Interface or static route to an Interface 0
Static route to an IP Address * 1
EIGRP Summary 5
BGP External 20
EIGRP Internal 90
IGRP 100
OSPF 110
IS-IS 115
RIP 120
EIGRP External 170
BGP Internal 200
Unknown Source ** 225

* Static route pointing is always 1 regardless if it points to a next hop IP address or to an outgoing interface.
** If the administrative distance is 255, the router does not believe the source of that route and does not install the route in its routing table.

When using route redistribution, occasionally there may be a need to modify the administrative distance of a protocol so that it takes precedence. For example, if you want the router to select RIP - learned routes (default value 120) rather than IGRP - learned routes (default value 100) to the same destination, you must increase the administrative distance for IGRP to 120+, or decrease the administrative distance of RIP to a value less than 100.

You can modify the administrative distance of a protocol using the distance command in the routing process subconfiguration mode, which specifies that the administrative distance is assigned to the routes learned from a particular routing protocol. This procedure is generally used when the network is being migrated from one routing protocol to another, the latter having a higher administrative distance. Keep in mind, however, that changing the administrative distance may lead to routing loops and black holes. While administrators can change default administrative distances by using the distance command in Router Configuration Mode, this is usually not advisable.

An example, if the router receives a route from OSPF and a route from RIP, it chooses the OSPF route. OSPF's administrative distance is 110, as compared to RIP's 120.

Here's another example: Let's say your router received a route from EIGRP Internal, whose administrative distance is 90, but you mistakenly entered a static route to an IP address, which has an administrative distance of 1. The router would use the static route and not the EIGRP route.

One last thought: Administrative distance is an important topic on the CCNA test. If you're preparing for this exam, make sure you know the administrative distances for the common routing protocols.

Metrics
A routing protocol uses a metric to determine which route to include in the routing table when it has two available routes to the same destination. The router will include the route with the smallest metric because it considers this route to be the shortest - and therefore best.
As opposed to administrative distance, metrics involve a single routing protocol. They have nothing to do with multiple sources for routes.

For example, here is a look at the truncated output of a show ip eigrp topology command:

P 10.55.103.0/24, 1 successors, FD is 6049536
  via 10.220.100.1 (6049536/5537536), Serial3/0
  via 10.55.100.14 (52825600/281600), Tunnel55

Notice that this routing protocol, EIGRP, has two routes to this network. However, the router will only include one of these routes - the one with the best metric - in the routing table. Here's an example of what the entry in the routing table looks like:

Router# show ip route 10.55.103.0
Routing entry for 10.55.103.0/24
  Known via "eigrp 100", distance 120, metric 6049536, type internal
  Redistributing via eigrp 100
  Last update from 10.220.100.1 on Serial3/0, 00:56:12 ago
  Routing Descriptor Blocks:
  * 10.220.100.1, from 10.220.100.1, 00:56:12 ago, via Serial3/0
    Route metric is 6049536, traffic share count is 1
    Total delay is 41000 microseconds, minimum bandwidth is 512 Kbit
    Reliability 226/255, minimum MTU 1500 bytes
    Loading 1/255, Hops 2

Different routing protocols calculate their metric in different ways. RIP uses hops, OSPF uses bandwidth, and EIGRP uses a combination of bandwidth, delay, load, and reliability with bandwidth and delay being the default combination.

Top