Administrative distance

From Infogalactic: the planetary knowledge core
Jump to: navigation, search

Administrative distance (AD) is an arbitrary numerical value assigned to a routing protocol, a static route or a directly-connected route based on its perceived quality of routing. The administrative distance (AD) value is often used by Cisco routers to determine the "best" route that should be used when multiple paths to the same destination exist.[1] A routing protocol with a lower administrative distance is considered "better" and is given priority over routing protocols with higher administrative distances.[1] The "better" route is selected by the router and is inserted into the router's routing table to be used to route traffic. For example, routes issued by EIGRP are considered more reliable than routes issued by RIP. This is because EIGRP has an administrative distance of 90 while RIP has an administrative distance of 120. The administrative distance (AD) value may be set manually by a network administrator. If a network administrator fails to properly set the administrative distance or configures multiple routing protocols with the same administrative distance, the router will use the default administrative distance.

Default administrative distances

The following table lists the default administrative distances for various routing protocols used on Cisco routers.[1]

Routing Protocol Administrative distance
Directly connected interface 0
Static route out an interface 1
Static route to next-hop address 1
DMNR - Dynamic Mobile Network Routing 3
EIGRP summary route 5
External BGP 20
Internal EIGRP 90
IGRP 100
OSPF 110
IS-IS 115
Routing Information Protocol (RIP) 120
Exterior Gateway Protocol (EGP) 140
On Demand Routing (ODR) 160
External EIGRP 170
Internal BGP 200
Floating Static Route (ex. DHCP-learned) 254
Unknown 255

Please note that:-

  • An administrative distance of 255 will cause the router to disbelieve the route entirely and not use it. An administrative distance of 255 will cause the router to remove the route from the RIB and not use it.* Since IOS 12.2, the administrative distance of a static route with an exit interface is 1. Prior to the release of 12.2 it was in fact 0.
  • Only the interface itself has an administrative distance of 0, since a route cannot be less than 1.
  • Directly connected routes have an administrative distance of 0.[citation needed]

Verifying administrative distance

Directly connected routes have an administrative distance of 1. This can be verified by issuing the show ip route command in privileged exec mode on the console of the Cisco router.[2][3] For example, the following commands can be issued in privileged exec mode on the router:-

Router# configure terminal
Router(config)# ip route 1.1.1.0 255.255.255.0 fastEthernet 0/0
Router(config)# do show ip route

The do show ip route command will display the following, confirming that a static route has an administrative distance of 1.

S   1.1.1.0/0 [1/0] via 172.31.0.1

Modifying the administrative distance on a Cisco router

In many cases, the administrative distance can lead to unexpected results, or lead to a route being selected that is not necessarily the "best" route. This is especially true if routing redistribution is being used on the router.[1] In this case, an administrator would usually modify the administrative distance manually, so that the desired routing protocols' routes take precedence over other routes.

For example, if an administrator wanted RIP routes to take precedence over OSPF routes, he may modify the administrative distance in order to do this. The following commands show an example of how to do this.[1]

R1> enable
R1# configure terminal
R1(config)# router rip
R1(config-router)# distance 90

Static routes may be used to provide an alternate path when a link fails. In order for static routes to be configured as a backup, the static route's administrative distance would need to be adjusted. Otherwise, it will take precedence over all routing protocols and routes issued from a routing protocol will not be inserted into the routing table.[1]

The following shows an example of the commands an administrator would type when setting the administrative distance. The value of 254 is the administrative distance for the newly created static route.[1]

R1(config)# ip route 10.0.0.0 255.0.0.0 backupLink 1 254

In the event that two routing protocols are configured with the same administrative distance, the Cisco router will ignore the configured values and instead use the default values.[4]

See also

References

  1. 1.0 1.1 1.2 1.3 1.4 1.5 1.6 Cisco Systems (2013), What is Administrative Distance?, retrieved 14 September 2013
  2. Cisco Systems (n.d), Configuring Static Routing, Cisco Systems Inc., retrieved 14 September 2013
  3. Cisco Systems (n.d), Show Commands, Cisco Systems Inc., retrieved 14 September 2013
  4. Cisco Systems(n.d.), Information About Routing, Cisco Systems Inc, retrieved 16 September 2013

External links