# Best path selection

**URL:** https://forum.networklessons.com/t/best-path-selection/43168
**Category:** SD-WAN
**Created:** [February 13, 2024, 5:39pm UTC](https://forum.networklessons.com/t/best-path-selection/43168 "2024-02-13T17:39:41Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![hemanttolwani1989](https://cdn-forum.networklessons.com/user_avatar/forum.networklessons.com/hemanttolwani1989/32/6008_2.png) [@hemanttolwani1989](https://forum.networklessons.com/u/hemanttolwani1989)
#### Post date: [February 13, 2024, 5:39pm UTC](https://forum.networklessons.com/t/best-path-selection/43168/1 "2024-02-13T17:39:41Z")

</div>

I am little confused which of the sequence is correct among the two for best path selection criteria.

1. AD
2. Metric
3. Longest prefix length

Or

1. Longest Prefix length
2. Lowest AD Value
3. Lowest metric value

As per my understanding if we want to install routes in routing table then below we use below sequence

1. AD
2. Metric
3. Longest prefix length

But for routes install in routing table then below sequence is used.

1. Longest Prefix length
2. Lowest AD Value
3. Lowest metric value

Is my understanding correct?

---

<div class="post-metadata">

### Author: ![lagapidis](https://cdn-forum.networklessons.com/user_avatar/forum.networklessons.com/lagapidis/32/4949_2.png) [@lagapidis](https://forum.networklessons.com/u/lagapidis)
#### Post date: [February 16, 2024, 6:24am UTC](https://forum.networklessons.com/t/best-path-selection/43168/2 "2024-02-16T06:24:08Z")

</div>

Hello Hemant

There are two processes involved in what you are describing. The first has to do with which candidate routes actually make it into the routing table. This is determined using the AD.

Then we go to the second process, which is choosing the route among all possibilities already in the routing table. Once routes enter the routing table, the next criterion is the longest prefix length. The more specific entry in the routing table is chosen.

If you have two or more routes to the specific destination of the same prefix length, then the metric is used to determine the best path.

If the metric is still the same, then load balancing may take place depending upon the configuration.

For a more thorough explanation, take a look at [this NetworkLessons note](https://notes.networklessons.com/routing-how-the-routing-table-is-populated) on the topic.

I hope this has been helpful!

Laz
