Skip to content
  • There are no suggestions because the search field is empty.

Path Determination Overview

For routers to successfully transfer packets, they must have an updated routing table. As you already know, the role of the router is to learn about all networks to which it is supposed to send traffic data. 

This can be done in two ways: manually configuring static routes to those networks or dynamically learning them through a routing protocol. Once the router learns all possible network routes, the path-determination process starts.

It is necessary to evaluate all available routes, select the best one and install it in the routing table. When you statically configure a route, you determine the best path to the network. However, when dynamic routing is in place, an algorithm selects the best route based on certain criteria.

So, let’s find out about the steps the router takes when several routes from different sources to the same learned network are available simultaneously. When a router can reach a network through a static route and a dynamically learned route, the static route is always selected as the best option.

The reason for this behavior is the parameter called Administrative Distance (AD) which routers use to prioritize one source over another. The AD identifies the trustworthiness of a source, and the lowest one (lower value) always wins.

The static route is used over a dynamically learned route to reach a destination network

As you can see in the figure above, a static route (AD of 1) is selected as a better source when compared to a dynamically learned route (the AD of OSPF is 110). However, when the same network is learned from different routing protocols, the route learned from the routing protocols with the lowest AD is selected, just like in the figure below, where EIGRP is selected over OSPF.

The routing protocol with the lowest AD is always selected as the best source

When multiple routes to the same network are learned from the same routing protocol, the AD is not helpful because it has the same value, so another parameter called metric comes into play. This is a value that the routing protocol assigns to a route to a specific network after the algorithm calculation is performed.

The route with the lowest metric learned from the routing protocol is always selected as the best one

As you can see in the image above, just like with the comparison of ADs, the same rule applies here. The lower the metric, the more preferred the route to the destination network is. The route with the lowest metric is then installed in the routing table. However, if multiple routes have the same metric, all of them are installed in the routing table. This is called load balancing.  

The Importance of Prefix Length

A packet's destination IP address could sometimes match multiple entries in a routing table since each entry can specify a subnetwork. In this case, the routing table prioritizes the longest prefix match over other routes, meaning entries will be chosen if they have a longer matching prefix than other available routes.

For example, a packet destined to the IP address 10.10.10.10 could match with three entries in the routing table: 10.0.0.0/8, 10.10.0.0/16, and 10.10.10.0/24. However, although all three entries match the destination IP address, they do so in different ways.

The 10.10.10.10 destination IP address matches the 10.0.0.0/8 network only in the first 8 bits, the 10.10.0.0/16 network only in the first 16 bits, and the 10.10.10.0/24 network in the first 24 bits.

The routing table entry with the longest match between the leading bits of the destination address and the network address is called the longest prefix match. In this case, the longest prefix match for the IP address 10.10.10.10 is 10.10.10.0/24, which will be used for sending the packets toward the destination IP.