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 5 lists the default distance for each type of source from which a route can be learned.

Table 5: 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:

Related Documentation