1.2.a Administrative distance

A single router can learn routes from multiple IP routing protocols, as well as thru connected and static routes. When a router learns a particular route from multiple sources it can not use the metrics since they all use different units. This is where the administrative distance (AD) comes in. The protocol with the lower AD is chosen and that route installed in the RIB.

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

Routing protocolAdministrative distance
Directly connected interface0
Static route out an interface1
Static route to next-hop address1
DMNR – Dynamic Mobile Network Routing3
EIGRP summary route5
External BGP20
Internal EIGRP90
IGRP100
OSPF110
IS-IS115
Routing Information Protocol (RIP)120
Exterior Gateway Protocol (EGP)140
On Demand Routing (ODR)160
External EIGRP170
Internal BGP200
Next Hop Resolution Protocol (NHRP)250
Default static route learned via DHCP254
Unknown and unused255

The RIB (Routing Information Base) follows the following logic:

  • If the route does not exist in the RIB, the route is accepted 
  • If the route exists in the RIB, the AD must be compared.  If the AD of the route already present in the RIB is lower than that of the process submitting the second copy of the route, then that second copy of the route is rejected and that routing process is notified. 
  • If the route exists in the RIB, the AD will be compared and if the AD of the route already present in the RIB is higher than that of the process submitting the second copy of the route, then the second copy of the route is accepted and the process owning the first copy of the route will be notified of its route being removed. 

Configuration

The defaults can be changed by using the distance command.

Changing the distance for RIP:

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

Changing the distance for OSPF:


R1(config)#router ospf 1
R1(config-router)#distance ospf intra-area 105 inter-area 105 external 125

Changes the AD to 105 for intra-area and interarea routes, and changes the AD to 125 for external routes

Changing the distance for EIGRP:

R1(config)#router eigrp 1
R1(config-router)#distance 80 105

Changes the AD to 80 for internal EIGRP routes and changes the AD to 105 for EIGRP external routes. This setting will affect all EIGRP routes. If you just wish to modify the distance for a single route you’ll need to specify the distance and the specific network

Changing the distance for BGP:

Router(config)#router bgp 65001
Router(config-router)#distance bgp 30 200 220

Changes the AD to 30 for external BGP routes, 200 for internal BGP routes and 220 for local BGP routes

Comments

So empty here ... leave a comment!

Leave a Reply

Sidebar