Routing - How the routing table is populated

A router can learn about a route to a particular destination from many sources. These can be from a dynamic routing protocol like EIGRP or OSPF, or via BGP, or even via a manually configured static route.

When multiple paths are learned from multiple sources about a single network destination, the following process is followed:

  1. The router examines the Administrative Distance (AD) of all the candidate routes. The AD value depends on the source of the route, that is, how the route was learned. The lower AD is preferred. If the AD is the same for two different sources the tie breaker follows this process.
  2. Once the source has been chosen, if we still have multiple paths learned from that single source, then we use the metric of the route to determine the best one, and that one is installed in the routing table. In the case of BGP, the BGP best path algorithm is used.
  3. If the metric is the same and
  • If equal-cost multi-path routing has is enabled for that particular source of routing information, both routes are installed in the routing table, and traffic is load balanced across them.
  • If it is not enabled, then each routing protocol will use its own tie breaking method. For example, EIGRP will use the path with the neighbor with the lowest router ID. Similarly, OSPF also uses the router ID as a tie breaker but may also use the interface IPv4 or IPv6 address or even the interface type.

So whatever entries you see in the Routing Table are a result of the above process. It is for this reason that load balancing cannot occur between routes learned from two different sources, such as EIGRP and OSPF for example. Because the AD check precedes any prerequisites for load balancing.

https://networklessons.com/cisco/ccna-200-301/introduction-to-administrative-distance https://networklessons.com/cisco/ccie-enterprise-infrastructure/how-to-configure-administrative-distance