navbarPDF Strip_TechNotes

What Is Administrative Distance?


Contents


Introduction

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.

Prerequisites

Readers of this document should be knowledgeable of the following:

Selecting the Best Path

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 distance - 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.

Route Source Default Distance Values
Connected interface 0
Static route 1
Enhanced Interior Gateway Routing Protocol (EIGRP) summary route 5
External Border Gateway Protocol (BGP) 20
Internal EIGRP 90
IGRP 100
OSPF 110
Intermediate System-to-Intermediate System (IS-IS) 115
Routing Information Protocol (RIP) 120
Exterior Gateway Protocol (EGP) 140
On Demand Routing (ODR) 160
External EIGRP 170
Internal BGP 200
Unknown* 255

*If the administrative distance is 255, the router does not believe the source of that route and will 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. So use caution if you change it.

The following example shows two routers, R1 and R2, connected via Ethernet. The loopback interfaces of the routers are also advertised using RIP and IGRP on both the routers. You can observe that the IGRP routes are preferred over the RIP routes in the routing table since the administrative distance is 100.

R1#show ip route
 
Gateway of last resort is not set
 
172.16.0.0/24 is subnetted, 1 subnets
C 172.16.1.0 is directly connected, Ethernet0
I 10.0.0.0/8 [100/1600] via 172.16.1.200, 00:00:01, Ethernet0
C 192.168.1.0/24 is directly connected, Loopback0
 
R2#show ip route
 
Gateway of last resort is not set
 
172.16.0.0/24 is subnetted, 1 subnets
C 172.16.1.0 is directly connected, Ethernet0
C 10.0.0.0/8 is directly connected, Loopback0
I 192.168.1.0/24 [100/1600] via 172.16.1.100, 00:00:33,

In order to enable the router to prefer RIP routes to IGRP, the distance command is configured as follows on R1.

R1(config)# router rip
R1(config-router)# distance 90

Now look at the routing table. It shows that the RIP routes are preferred. They are learned with an administrative distance of 90, although the default is 120. Note that the new administrative distance value is relevant only to the routing process of a single router (in this case R1). R2 still has IGRP routes in its routing table.

R1#show ip route
 
Gateway of last resort is not set
 
172.16.0.0/24 is subnetted, 1 subnets
C 172.16.1.0 is directly connected, Ethernet0
R 10.0.0.0/8 [90/1] via 172.16.1.200, 00:00:16, Ethernet0
C 192.168.1.0/24 is directly connected, Loopback0
 
R2#show ip route
 
Gateway of last resort is not set
 
172.16.0.0/24 is subnetted, 1 subnets
C 172.16.1.0 is directly connected, Ethernet0
C 10.0.0.0/8 is directly connected, Loopback0
I 192.168.1.0/24 [100/1600] via 172.16.1.100, 00:00:33,

There are no general guidelines for assigning administrative distances because each network has its own requirements. You must determine a reasonable matrix of administrative distances for the network as a whole.


Related Information


Toolbar

All contents are Copyright © 1992--2003 Cisco Systems Inc. All rights reserved. Important Notices and Privacy Statement.


Updated: May 19, 2003Document ID: 15986