Luminis Logo Luminis

  • Six Sigma
  • Corporate Success
  • Cabling
  • Success Solution
  • Lean Six Sigma Training & Consultancy
  • DMAIC Methodology For Process Improvement
  • Continuous Improvement is KEY to Progress!!
  • Hi-End Networking Training
  • Management Consulting & Leadership Development

[Featured] Online Training Boot Camps

The very best of training boot-camps which are most preferred by our clients are:

Six Sigma Black Belt, Six Sigma Green Belt, MCSA 2012 Server R2, CCNA - Routing & Switching, CCNA - Security, CCNA - Service Provider


World Class Six Sigma Black Belt Training Program

Luminis’ Six Sigma Black Belt Certification, transforms the employee into a professional that understands the underlying Six Sigma principles, which at the same time have a necessary awareness of tools required for Lean thinking. 

Read More

MCSE 2012 Server R2

Validates that you have the skills needed to run a highly efficient and modern data center, with expertise in identity management, systems management, virtualization, storage, and networking.

Read More

World Class Six Sigma Black Belt Training Program

Luminis’ Six Sigma Green Belt program, is designed for certification of an individual at the “green belt” level. Six Sigma Green Belt, is subset of a very comprehensive training program ‘Luminis Six Sigma Black Belt’ 

Read More

Best CCNP Boot-camp Training

Demonstrate the skills required in enterprise roles such as network technician, support engineer, systems engineer, or network engineer.

Read More

Best CCNA Boot-Camp: Routing & Switching

Your first step for a career in Cisco networking with the ability to manage and optimize network systems built with Cisco routers & switches. 

Read more

Best CCNA Boot-Camp: Security

You lay the foundation for job roles such as network security specialist, security administrator, and network security support engineer.

Read more

How Does Route Selection Work in Cisco Routers?


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 are critical.

Administrative distance is the feature used by routers to select the best path when there are two or more different routes to the same destination from different routing protocols. Administrative distance defines the reliability of a routing protocol. Each routing protocol is prioritized in order of most to least reliable (believable) using an administrative distance value.


Before we dive deep into the selection process of route for best path, I want to start from very basics first.

Suppose we have two PCs the they are directly connected with each other.

Two PCs Connected

The network starts to grow and we have more PCs.


PCs Connected with Switch1


Now we need a switch to connect them, but still they are in a single network. Network continuously growing and they also need to access the Internet or they need to connect to the other networks as well.

PCs Connected with Router

To establish the communication between the networks, we require router. The router maintains the routing table, and places the routes or networks in the routing table.

Processes Involved In Building And Maintaining The Routing Table

There are three processes involved in building and maintaining the routing table, particularly in a Cisco router:

1. Routing protocol
2. Routing table
3. Packet Forwarding decision

Routing protocol

Router builds routing table by collecting the information about the network or networks, which can be connected directly or remotely. Who will provide the information about these networks? For the directly connected networks router need not any routing protocol, it enters these network into routing table by its own. The networks which are not directly connected, router needs to learn by manually or with the help of routing protocols.

Building the Routing Table

The main considerations while building the routing table are:

Administrative distance (AD)− This is the measure of trustworthiness of the source of the route. If a router learns about a destination from more than one routing protocol, administrative distance is compared and the preference is given to the routes with lower administrative distance. In other words, it is the believability of the source of the route.

Metrics − This is a measure used by the routing protocol to calculate the best path to a given destination, if it learns multiple paths to the same destination. Each routing protocol uses a different metric.

Prefix length

With the help of example, we will observe how these parameters are affecting in the building the routing table and packet forwarding decisions.

 Route Selection in Same Prefix Scenario1 1

In this scenario on R1-R5, configured RIP, OSPF, and EIGRP simultaneously. Let us see how the router will work in this situation. Configure a Loopback interface (Loopback 1, with IP address on each router, advertise this loopback on every router and in each routing protocol and also define a static route on R1 for the same.

Routing protocol configurations and Routing tables:

We will observe only the loopback route (

Observation 1:

In the output of the R1, we can see network is advertised in EIGRP, OSPF, RIP, and static route. R1 will install the directly connected and in its routing table, reason is that AD of the directly connected route is lowest which is 0.

R1 Routing table

R2 is receiving the network via EIGRP as and via OSPF as For R2 and are the different routes, so it includes both and are advertised by two different routing protocols.

R2 Routing table

R3 installed the directly connected and in its routing table.

R3 Routing table

R4 installed the directly connected and in its routing table.

R4 Routing table

R5 installed the directly connected and in its routing table.

R5 Routing table

Observation 2:

In the next steps, get ready to see the magic!

R1 placed the and directly connected routes in the routing table. On R1 we also have configured static route for, turn off the loopback 1 on R1. Now R1 will give the entry to the route learned by static route, due to the AD is lower than the any other routing protocol.

R1 Routing table static Route

Observation 3:

If we remove the static route on R1, it will place the longest prefix length route in the routing table, which is learned by OSPF.

R1 Routing table Remove static Route

Featured Article New CCNA Cyber Ops

Observation 4:

After disabling the EIGRP, then the routes advertised by OSPF will place in the routing table, because the OSPF AD is 110 and RIP's AD is 120.

R1 Routing table Remove EIGRP

Observation 5:

If we will disable OSPF, then the router will advertise the route in routing table, which are learned by RIP.

R1 Routing table Remove OSPF

So, we can say that when a router receives a route with the same prefix from different routing protocols, the selection of the route is dependent on Administrative Distance of the routing protocol and lower AD will be preferred.

Featured Article

Prefix length

Let's look at another scenario to see how the router handles another situation: varying prefix lengths. Assume, again, that each router has running EIGRP, OSPF, and RIP configured on respective router as per given below:

  • R3--EIGRP (internal):
  • R4--RIP:
  • R5--EIGRP:

Q. Which of these routes will be installed in the routing table?

Since EIGRP internal routes have the best administrative distance, it's tempting to assume that the first one will be installed. However, each of these routes have a different prefix length (subnet mask), they're considered different destinations, and they will all be installed in the routing table.

Let's see how the forwarding engine uses the information from the routing table to make forwarding decisions.

Route Selection in Different Prefix Scenario2

scenario 2 Routing Protocol

Making Forwarding Decisions

Let's look at the three routes we just installed in the routing table, and see how they look on the router.

R2# show ip route
Three Routes




If a packet arrives on a router interface destined for, which route would the router choose?

It depends on the prefix length, or the number of bits set in the subnet mask. Longer prefixes are always preferred over shorter ones when forwarding a packet.

In this case, a packet destined to is directed toward, because falls within the network ( to It also falls within the other two routes available, but the has the longest prefix within the routing table (26 bits verses 24 or 19 bits).

Traceroute Or Tracert 1

Likewise, if a packet destined for arrives on one of the router's interfaces, it's forwarded to, because doesn't fall within ( through, but it does fall within the destination ( through Again, it also falls into the range covered by, but has a longer prefix length.

Traceroute Or Tracert 2

Beyond the scope of those two, rest of the traffic will go to, and is forwarded towards

Traceroute Or Tracert 3

Route selection can also be influenced by changing in matric and it also varies as per the protocol. 

What do you think about this explanation?




This article is written & published by Ms. Meena, Senior Manager - IT, at Luminis Consulting Services Pvt Ltd, India. She can be reached at Email:  and/or Linkedin: https://www.linkedin.com/in/meena1 

Print Email

0 # RE: How Does Route Selection Work in Cisco Routers?RAJA N 2019-05-01 12:47
Perfect and clear explanation.


If one read this, no more doubt...

Thank you meena...
Reply | Reply with quote | Quote
Add comment
Kindly use 'Add Comment' section, if you feel that your comment stands at its own. In case, you wish to reply to the comment(s) made by other users of the website, you may use the 'Reply' options given underneath each comment.


Prof. Ashok Menon (in Name field)
http://www.yahoo.com (in Website field, if any)
HOD - Mechanical Engineering at ABC Institute of Engineering, Mumbai (in Job Title field)


Luminis Consulting Services promotes a receptive, transparent and civil atmosphere for comments and users. Critical, in-depth and intelligent discussions and debates are encouraged and the best of these are highlighted in various ways, such as Homepage display etc. Everyone is welcome and encouraged to voice their opinion regardless of identity, politics, ideology, religion or agreement with other community members, the author of the post or staff members as long as those opinions are respectful and constructively add to the conversation.

However, this community does not tolerate direct or indirect attacks, name-calling or insults, nor does it tolerate intentional attempts to derail, hijack, troll or bait others into an emotional response. These types of comments will be removed from the community where warranted. To maintain a civil atmosphere, our moderation team may read comments before they are displayed to other users, as we strive to get to all comments as quickly as possible. However, Luminis Consulting Services reserves the right to add, delete, edit or act upon the comments made by any user. Thanks!