Routing what if the administrative distance is the same

A Cisco IOS router will behave as follows when it learns of a particular route from multiple sources with the same configured administrative distance.

  1. If eBGP, EIGRP, RIP, OSPF, and a static route are all advertising the same prefix with the same AD, then they are installed in the routing table in the same order as their original AD values. in other words, they are installed in the following order:
  • static
  • eBGP
  • EIGRP
  • OSPF
  • RIP
  • iBGP
  1. Load balancing will never take place between two paths that are advertised from different sources, even if the AD is the same. For example, a route to 192.168.55.0/24 learned from both EIGRP and OSFP with the same AD will never have two entries in the routing table, and will never be load balanced. EIGRP will take precedence over OSPF, and thus only the EIGRP learned route is installed.

  2. The above are true only for identical prefixes. A prefix is the same only if the network address and the subnet mask are the same. For example, if EIGRP advertises a route to 172.16.0.0/23, and RIP advertises a route to 172.16.0.0/24, both routes will appear in the routing table, regardless of the AD. This is because they are considered different prefixes.

Links:

https://forum.networklessons.com/t/administrative-distance-for-ccna-students/874/24?u=lagapides

https://www.cisco.com/c/en/us/support/docs/ip/enhanced-interior-gateway-routing-protocol-eigrp/8651-21.html