Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Navigation
Guide That Contains This Content
[+] Expand All
[-] Collapse All

    Setting the Administrative Distance for a Route

    The administrative distance is an integer that is associated with each route known to a router. The distance represents how reliable the source of the route is considered to be. A lower value is preferred over a higher value. An administrative distance of 255 indicates no confidence in the source; routes with this distance are not installed in the routing table.

    Table 1 lists the default distance for each type of source from which a route can be learned.

    Table 1: Default Administrative Distances for Route Sources

    Route Source

    Default Distance

    Connected interface

    0

    Static route

    1

    Internal access route

    2

    Access route

    3

    External BGP

    20

    OSPF

    110

    IS-IS

    115

    RIP

    120

    Internal BGP

    200

    Unknown

    255

    If the IP routing table contains several routes to the same prefix—for example, an OSPF route and a RIP route—the route with the lowest administrative distance is used for forwarding.

    To set the administrative distance for BGP routes, see JunosE BGP and MPLS Configuration Guide.

    You can set the administrative distance for RIP, IS-IS, and OSPF using the distance and distance ip commands.

    To set an administrative distance:

    • For RIP and OSPF, issue the distance command in Router Configuration mode.
      host1(config-router)#distance 100

      The range for administrative distance is 0–255. The default value is 120 for RIP routes and 110 for OSPF routes. You can use the no version to restore the default value.

    • For IS-IS, issue the distance ip command in Router Configuration mode.
      host1(config-router)#distance 80 ip

      The range for administrative distance is 1–255. The default value is 115 for IS-IS routes. You can use the no version to restore the default value.

    Published: 2014-08-13