Administrative Distance and Metric

Cisco IOS Software uses the concept of administrative distance to decide which routes to place in the routing table when learned via different dynamic routing protocol sources. In other words, the administrative distance is used to compare routes originating from different routing protocols (including static and connected), whereas the metric is used to compare routes within one single source of origin or family. The default administrative distance value itself is a proprietary concept and derived from quality aspects of old or modern routing protocols. What matters more is its value for relative comparison. Several other vendors have implemented the Cisco numeric values for administrative distances. However, this is merely common practice and not based on standards.


For the discussion in this chapter, the terms routing table and forwarding table are used interchangeably, because this is common practice in the literature as well. However, understanding of the difference between those terms and the Forwarding Information Base (FIB) and Routing Information Base (RIB) is of paramount importance for a thorough grasp of the structures where dynamic routing protocols store their information and how it is ultimately used for forwarding decisions by the stack.

UNIX routing tables and forwarding information bases do not employ the concept of administrative distance per se. Directly connected interfaces, static routes to gateways or interfaces, as well as routes learned via dynamic routing protocols are expressed in terms of metrics/hop count. However, some routing engines such as MRTd, Zebra, or GateD use an administrative distance or equivalent for internal comparison and FIB population. UNIX routing tables employ the fundamental concept of "most specific route/prefix first" as well.

Because Cisco IOS Software employs administrative distances, it uses them to differentiate connected routes (0 or 1) from static routes (usually 1). The subtle reason why connected routes can appear with an administrative distance of both 0 and 1 is explained in the section "The Near and Far End of a Link" later in this chapter. As one notable difference to UNIX forwarding tables, Cisco IOS Software static routes differ from each other in terms of administrative distance. In the UNIX world, they solely differ in terms of metric and nothing else. In the view of the Cisco IOS designers, the view of metrics for connected and static routes is not applicable and reserved for dynamic routes to express the preference of a route.

There is one notable difference between Linux and the BSD world of operating systems: BSD Unices do not provide a metric when adding routes via the route command. In contrast, all BSD ifconfig implementations are capable of metric assignments to an interface.