# Route priorities and interface metrics

**URL:** <https://forum.pritunl.com/t/route-priorities-and-interface-metrics/701>\
**Category:** Pritunl VPN\
**Created:** [January 20, 2023, 8:51am UTC](https://forum.pritunl.com/t/route-priorities-and-interface-metrics/701 "2023-01-20T08:51:38Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![erlo](https://forum.pritunl.com/letter_avatar_proxy/v4/letter/e/f07891/32.png) [@erlo](https://forum.pritunl.com/u/erlo)\
**Post date:** [January 20, 2023, 8:51am UTC](https://forum.pritunl.com/t/route-priorities-and-interface-metrics/701/1 "2023-01-20T08:51:38Z")

</div>

Hello,

We are working on Pritunl deployment. However we are facing to some issues.  
Using Windows Pritunl client (up to date version), for users connected with 1Gb wire, the metrics applied to route define on Pritunl virtual interface and physical interfaces are the same when configured with automatic metric: value=25 ([The Automatic Metric feature for IPv4 routes - Windows Server | Microsoft Learn](https://learn.microsoft.com/en-us/troubleshoot/windows-server/networking/automatic-metric-for-ipv4-routes)).

We are using Pritunl to route all traffic from client (route 0.0.0.0/0 set)

So it means DNS server announced by Pritunl will not be prioritize because it’s not applied on the lowest interface metric.

If I manually set a low metric value on the “Pritunl 1” interface, everything work as expected. I’ve also identified that a metric value can be configured on the route setting in Pritunl (in Advanced UI), but I don’t find any documentation about this, and it seems having no impact on the metric applied on the client.

Excepted enforcing a static value for metric on the client virtual interface, what is the most appropriate solution to achieve prioritize Pritunl to always route all traffic ?

Thanks!

---

<div class="post-metadata">

**Author:** ![erlo](https://forum.pritunl.com/letter_avatar_proxy/v4/letter/e/f07891/32.png) [@erlo](https://forum.pritunl.com/u/erlo)\
**Post date:** [January 23, 2023, 10:32am UTC](https://forum.pritunl.com/t/route-priorities-and-interface-metrics/701/2 "2023-01-23T10:32:14Z")

</div>

Is anyone know something about this ?  
We are observed that metric seems to be automatically reset to “Automatic value”. So it automatically go back to the default metric value…

This is a real issue because it means VPN cannot properly work for users with 1G wire connection…

Is there a possibility to automatically run a command or apply a config once the VPN is connected ?

Many thanks!

---

<div class="post-metadata">

**Author:** ![zach](https://forum.pritunl.com/user_avatar/forum.pritunl.com/zach/32/1105_2.png) [@zach](https://forum.pritunl.com/u/zach)\
**Post date:** [January 30, 2023, 7:10am UTC](https://forum.pritunl.com/t/route-priorities-and-interface-metrics/701/3 "2023-01-30T07:10:56Z")

</div>

I have tested some changes to the client to add an option to force metric priority. It will take some time to finish adding this to the client.

---

<div class="post-metadata">

**Author:** ![erlo](https://forum.pritunl.com/letter_avatar_proxy/v4/letter/e/f07891/32.png) [@erlo](https://forum.pritunl.com/u/erlo)\
**Post date:** [January 30, 2023, 8:13am UTC](https://forum.pritunl.com/t/route-priorities-and-interface-metrics/701/4 "2023-01-30T08:13:09Z")

</div>

That’s good news, thanks!  
Let us know when the feature will be available.

---

<div class="post-metadata">

**Author:** ![zach](https://forum.pritunl.com/user_avatar/forum.pritunl.com/zach/32/1105_2.png) [@zach](https://forum.pritunl.com/u/zach)\
**Post date:** [February 13, 2023, 2:13am UTC](https://forum.pritunl.com/t/route-priorities-and-interface-metrics/701/5 "2023-02-13T02:13:55Z")

</div>

The code for this feature has been added to the repository. It will be available in the next release under the Advanced Settings in the top right menu.

---

<div class="post-metadata">

**Author:** ![erlo](https://forum.pritunl.com/letter_avatar_proxy/v4/letter/e/f07891/32.png) [@erlo](https://forum.pritunl.com/u/erlo)\
**Post date:** [February 16, 2023, 12:40pm UTC](https://forum.pritunl.com/t/route-priorities-and-interface-metrics/701/6 "2023-02-16T12:40:17Z")

</div>

Thanks @zach for the update, we need to spent more time to test, but it looks very promising !  
Could you point us to the best solution to apply this setting during deployment on all our devices ?

---

<div class="post-metadata">

**Author:** ![zach](https://forum.pritunl.com/user_avatar/forum.pritunl.com/zach/32/1105_2.png) [@zach](https://forum.pritunl.com/u/zach)\
**Post date:** [February 16, 2023, 7:22pm UTC](https://forum.pritunl.com/t/route-priorities-and-interface-metrics/701/7 "2023-02-16T19:22:18Z")

</div>

The configuration file can be placed at `C:\ProgramData\Pritunl\pritunl-client.json` in the format below to automatically configure the option.

```auto
{
	"interface_metric": 5
}

```

---

<div class="post-metadata">

**Author:** ![lolmaus](https://forum.pritunl.com/user_avatar/forum.pritunl.com/lolmaus/32/388_2.png) [@lolmaus](https://forum.pritunl.com/u/lolmaus)\
**Post date:** [April 11, 2023, 10:26am UTC](https://forum.pritunl.com/t/route-priorities-and-interface-metrics/701/8 "2023-04-11T10:26:32Z")

</div>

I tried it and it didn’t help.

Neither `pritunl-client.json`, nor `interface_metric` are documented anywhere on the internet.

Please help me automate the update of interface metric for Pritunl on Windows 10.

---

<div class="post-metadata">

**Author:** ![lolmaus](https://forum.pritunl.com/user_avatar/forum.pritunl.com/lolmaus/32/388_2.png) [@lolmaus](https://forum.pritunl.com/u/lolmaus)\
**Post date:** [April 11, 2023, 10:28am UTC](https://forum.pritunl.com/t/route-priorities-and-interface-metrics/701/9 "2023-04-11T10:28:14Z")

</div>

Ah, this worked! Thanks!
