Altering OSPF Administrative Distance
An administrative distance is a rating of the priority (that is, trustworthiness) of a routing information source, such as an individual router or a group of routers. Numerically, an administrative distance is an integer from 0 to 255. Specifically, the higher the numerical value of administrative distance, the lower the trust rating. An administrative distance of 255 means that the routing information source cannot be trusted and should be ignored. Table 5-14 shows administrative distance values.
|
Route Source/Type |
|
|
Connected interface |
0 |
|
Static route pointing at an interface |
0 |
|
Static route to a next-hop interface |
1 |
|
5 |
|
|
External BGP |
20 |
|
EIGRP |
90 |
314 Chapter 5: Routing Concepts and Configuration
|
IGRP |
100 |
|
OSPF |
110 |
|
IS-IS |
115 |
|
RIP-1 and RIP-2 |
120 |
|
EGP |
140 |
|
External EIGRP |
170 |
|
Internal BGP |
200 |
|
Unknown route or Unreachable |
255 |
As previously discussed, OSPF uses three different types of routes: intra-area, inter-area, and external. Routes within an area are intra-area; routes to another area are inter-area; and routes from another routing domain learned via redistribution are external. The default distance for each type of route is 110. Use the distance ospf command when you have multiple OSPF routing processes doing mutual redistribution and you want to prefer internal routes over all external routes. You can accomplish this by setting all the external routes to a distance of 200, for example.
To change any of the OSPF distance values, use the following command in router configuration mode:
distance ospf {[intra-area distl] [inter-area dist2] [external dist3]}
When using this command, you must use at least one of the keywords.
CAUTION Use care when changing the defaults here because problems such as a routing loop might result.
Continue reading here: Load Balancing
Was this article helpful?