7.5 Using Multiple Routing Protocols
7.5.3 Selecting the best plan
Most routing protocols have metric structures and algorithms that are not compatible with other protocols. In a network where multiple routing protocols are present, the exchange of route information and the capability to select the best path across the multiple protocols is critical.

In order for routers to select the best path when they learn two or more different routes to the same destination from two different routing protocols, Cisco uses administrative distance, which defines the believability of a routing protocol. Each routing protocol is prioritized in order of most to least (believable) reliable using a value called administrative distance.

This criterion is the first a router uses to determine which routing protocol to believe if two protocols provide route information for the same destination. The more believable protocol is selected, even when it advertises a suboptimal route.

What Protocol to Believe?

Figure lists the believability (administrative distance) of the protocols that Cisco supports. Note that the smaller the administrative distance, the more reliable the protocol. For example, if the router received a route to network 10.2.2.0 from IGRP and then received a route to the same network from OSPF, IGRP is more believable, so the IGRP version of the route would be added to the routing table.

When using route redistribution, occasionally there may be a need to modify the administrative distance of a protocol so that it has preference. If you want the router to select RIP-learned routers rather than IGRP-learned routes to the same destination, for example, then you must increase the administrative distance for IGRP.  

After an ASBR selects the routing protocol to which to listen, it must be able to translate the metric of the received route from the source routing protocol into the other routing protocol. If an ASBR receives a RIP route, for example, it will have a hop count as a metric. To redistribute it into OSPF, however, the hop count must be translated into a cost value. The cost value you define during configuration is referred to as the seed or default metric.

After the seed metric is established, the metric will increment normally within the AS. The exceptions are OSPF E2 routes, as discussed previously, which hold their default metric regardless of how far they are propagated across an AS.

You should take some precautions when a loop exists between two ASs, as shown in Figure . Consider setting the default metric on the incoming redistributed route to something higher than what currently exists in the receiving protocol. This way, you get some degree of automatic protection from route loops.

Suppose a route loop exists where a routing protocol is getting preferred routes that it originally sourced. If those routes are in at a low metric, they can be preferred over the original route.

So, imagine a router Z in a RIP domain knows that network A, a route native to the RIP domain of which you are a member, is currently at a cost of three hops from my point of view. Now suppose that the route to A has been redistributed to some foreign protocol and is now coming back into the RIP domain from the outside and router Z is only one hop away from the point of redistribution.

If the redistributing router sets the metric for this new route to network A to one, the router Z cost to A is now only two hops, and it now points toward the redistribution router. If the redistribution router sets the metric to four hops, for example, then all will be well, even though technically a route loop is occurring. Setting the incoming default metric low may create a black hole for routes.