Only the best route to the destination network is registered in the routing table.

The route of a certain network can be configured as a static route, but can also be learned by a routing protocol. We can also run multiple routing protocols instead of just one, and learn the route information of a certain network from multiple routing protocols. In other words, the route information of a network may be learned from multiple sources. Even if multiple route information is learned, in principle, only the best route is registered in the routing table.

If there is more than one route that can be considered “best,” it is equal-cost load balancing. Multiple best route information for a given network may be registered in the routing table.

When route information for a given network is learned from multiple sources

As shown in the following figure, consider the case where the route information for 192.168.10.0/24 on R1 is not only configured as a static route, but is also learned through RIP and OSPF. The R1 has to decide which one is the best route.

Fig. Learn routes to a network from multiple sources.
Fig. Learn routes to a network from multiple sources.

Metrics are the criteria for determining the best route to a given network. Metric indicates the distance to the destination network. However, metric has no meaning in route information configured for static routes; on Cisco routers, the metric for static routes is “0”. Also, we cannot simply compare metric values because different routing protocols have completely different ideas of metric and the range of possible values. Simply comparing metric values is like trying to simply compare one “meter” to one “foot” in terms of real-world distances. The metric for each routing protocol is shown in the table below.

Routing Protocol Metrics
RIP Hop count
OSPF Path cost
EIGRP Composite Metrics(BW , Delay , Load , Reliability , MTU)
Table Metrics by routing protocol

In the figure, priority is given to clarity, and there are some differences from the actual behavior. The OSPF route information will not necessarily be the network address/subnet mask + metric as shown in the figure. Also, the metric of the OSPF route on R1 will be increased from the metric of the received route information.

Distance to destination network = Administrative distance/metric

When comparing distances with different units, such as 1 “meter” and 1 “foot” in the real world, the units must be aligned. The parameter used to adjust the units when comparing metrics is the Administrative Distance. Combining the administrative distance and the metric as the distance to the destination network allows us to compare the distances of routes with different sources of information, such as static routes, RIP routes, and OSPF routes.

Distance to destination network = Administrative distance/metric

Shorter distances are better, so smaller values are preferred for both the administrative distance and the metric. The smaller the value of the administrative distance, the shorter the distance is considered to be, since it is preceded by the administrative distance. The default value of the administrative distance is as shown in the following table.

Route Source Administrative Distance value
Connected 0
Static route 1
BGP 20
EIGRP 90
OSPF 110
RIP 120
External EIGRP 170
IBGP 200
Table administrative distance value(default)

Considering the distance of the route information for 192.168.10.0/24 in the previous configuration example, we have the following

Distance to 192.168.10.0/24
Static route:[1/0]
RIP route:[120/3]
OSPF route:[110/10]

Since the static route has the shortest distance, the route information of the static route will be registered in the routing table as the best route for 192.168.10.0/24.

Fig. Selecting the best route by administrative distance/metric
Fig. Selecting the best route by administrative distance/metric

The value of the administrative distance can also be changed from the default. If you change the administrative distance, you can choose which information source to register as the route information in the routing table when the route information of a certain network is learned from multiple sources.

Administrative distance is often explained as “the reliability of the route information sources. But it would be easier to think of it as meaning distance, as in “distance”. The advantages and disadvantages of large and small values are also clear. Smaller values of Administrative Distance are better. If we think of it as a distance, we can easily understand that “the smaller the value, the better.
Also, Administrative Distance is a parameter that is used locally on the router. It is not included in the route information advertised by the routing protocol.
Administrative distance is a Cisco proprietary parameter. However, other vendors also have parameters that are equivalent to Administrative Distance.

summary

Summary

  • Only the best route to the destination network is registered in the routing table. To determine the best route, the distance to the destination network is measured.
  • In the route information sent by each routing protocol, there is a metric value that measures the distance to the destination network. However, since each routing protocol has a different concept of metric, it is not possible to simply compare metric values for different routing protocols.
  • The administrative distance makes it possible to compare the values of different metrics for different routing protocols.
  • Distance to destination network = Administrative distance/metric