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 6 lists the default distance for each type of source from which a route can be learned.
Table 6: 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.
To set the administrative distance for RIP, IS-IS, and OSPF, use the following distance commands in Router Configuration mode.
distance
- host1(config)#router rip
- host1(config-router)#distance 100
distance ip
- host1(config)#router isis
- host1(config-router)#distance 80 ip