Understanding Administrative Distance

When you use more than one routing protocol—for example, when you redistribute you need to be aware of administrative distances. An administrative distance is a priority assigned to a route based on its routing protocol. When a router receives the same route from more than one protocol, which one should it use? Should it, for example, use the route heard from RIP or the one heard from OSPF? Because RIP and OSPF have completely different metrics, the router cannot decide by comparing metrics, so another value, the administrative distance, is used. Consider the diagram in Figure 3-5.

Figure 3-5 St letting Routes with Administrative Distance

192.168.1.0

OSPF

192.168.1.0

192.168.1.0

Protocol

Administrative

Distance

EIGRP

90

IGRP

100

OSPF

110

RIP

120

The router in Figure 3-5 has learned the same network, 192.168.1.0, on two different interfaces and from two different protocols: RIP and OSPF. To determine the route that should be used, the router looks at its preprogrammed ranking of protocols by administrative distance. The route learned by the protocol with the lowest administrative distance is preferred. It is the route installed in the routing table and used to reach the destination. For the situation depicted in Figure 3-5, the router prefers the OSPI route to the RIP route because OSPF has a lower administrative distance (110 for OSPF versus 120 for RIP).

NOTE Administrative distances are locally significant: They are not communicated across routers.

The default administrative distance for each routing protocol is listed in Table 3-1. By default, all routes learned from a protocol have the same administrative distance—for example, all OSPF routes have an administrative distance of 110.

Table 3-1 Default Administrative Distances by Routing Protocol

Type of Route

Administrative Distance

Connected interface

0

Static route

1

EIGRP summary route

5

External BGP

20

EIGRP

90

IGRP

100

OSPF

110

1S-IS

115

RIP

120

F.xternal EIGRP

170

Internal BGP

200

Unknown Route ignored

255

External EIGRP routes (see Table 3-1) arc routes redistributed into E1GRP. For example, RIP routes redistributed into EIGRP are marked as external routes and carry this distinction as they are routed by EIGRP

To change the administrative distance of a routing protocol, issue the distance router mode command:

router ospf 10 distance 125

The preceding configuration changes the administrative distance of OSPF routes from 110 to 125. This is higher than RIP's administrative distance and means the router will prefer RIP routes to OSPF routes (RIP has a default distance of 120). Altering the default distances like this is often done during a migration to a new routing protocol—that is, you make the new routing protocol a higher distance than the old protocol until the new protocol is stable. After the new protocol is in place, you can return the distances to their original values and then disable the old protocol.

NOTE

The administrative distance of a route is sometimes called a measure of the route's believability. A router considers a route more believable than another if it has a lower administrative distance.

Administrative distances can cause problems when you redistribute. Consider the network in Figure 3-6.

Figure 3-6 Problems with Administrative Distance and Redistribution

OSPF RIP

Figure 3-6 Problems with Administrative Distance and Redistribution

OSPF RIP

Server

Router E

Router D 10.1.1.0/24

Server

Router E

Router D 10.1.1.0/24

Client

In Figure 3-6, Router A and Router B are doing mutual redistribution between the OSPF and RIP domains. Router D sends RIP advertisements for its directly connected network 10.1.1.0/ 24. Router C forwards the route to Router A, which redistributes it into OSPF. The route then travels over OSPF to Router B (Router B accepts the route through its HthernetO interface). Router B has just learned the route 10.1.1.0/24 through OSPF. Now, Router B also learns of 10.1.1.0/24 on its Serial I interface through RIP the route is sent by Router D, as depicted by the arrow from Router D to Router B in Figure 3-6.

Of the two routes received, Router B uses the route learned through OSPF because it has a lower administrative distance than RIP. Subsequently, all traffic from Router B to 10.1.1.0/24 follows a roundabout path (B—>A—>C-»D) instead of the more direct path from Router B to Router D. When the server near Router E (refer to Figure 3-6) sends data to the client below Router D, the traffic flows along the suboptimal path because Router B selects Router A as the next hop. This is an undesirable consequence of redistribution. One way to solve the problem is to apply an inbound route filter on Router B such that Router B does not install the OSPF route for 10.1.1.0/24 in its routing table, thus forcing Router B to use the RIP route to reach the destination. However, this solution does not stop Router B from forwarding the route to other OSPF routers, because OSPF is a link-state protocol and must broadly propagate LSAs. The following section looks at route filters and redistribution in more detail.

0 0

Post a comment