4G-MiFi WAN Priority

Apologies if I’ve missed this in either the documentation or another forum thread. I have tried searching.

Could someone please clarify the order of priority for the WAN interfaces if multiple options are available (for version 3 if it’s different to 2.27). Is it the same as the icons in the UI? namely:

  1. Wired Ethernet
  2. Wi-Fi STA
  3. Tethered Phone
  4. 4G Modem

If so, is there a (fairly) easy way to change the priority?

Many thanks in advance,
David

Yes you are correct. This order is the same in version 2 and 3.

Check /etc/config/network

You will find metric in each section. Change the metric value. A lower value is prior to a higher value.

I am not sure if the value will be override by the firmware automatically when there is new settings.

1 Like

Many thanks for the clarification.

David

In case anyone is reading this, you can confirm the metric of each connection through the LUCI page (i.e. the “Advanced” settings) rather than via SSH if desired.

Select the “Status” main page and the “Routes” sub-page under status.
That page will show active IPv4 (and IPv6 now) routes, as well as the metric for each route.
The lower the metric, the higher the priority (think place in a race so 10th place comes in before 30th place.)
I.E. I have a WAN connection to my ISP and my phone tethered via USB (and of course LAN connection.)
The LAN connections are all the first priority, so have the lowest metric (“0”).
The WAN (ISP/wired) connection is the next priority in routing, so have the second lowest metric (“10”)
The USB tethered phone is the next priority for me, so has the largest metric (“30”)

Note there is no “20” metric for me, as I don’t have a WiFi repeater failover set up. If I did, it would be the “20” metric, and therefore would be used after the WAN/ISP internet connection failed but before the USB tether was used (“30”).

I noticed this topic, so I’ll leave a note too,
/etc/config/mwan3` has its own metric (connection priority), and mwan3 relies solely on this to determine the preferred connection and promote it. As a result, high metric connections often prioritized.
However, keep in mind that mwan3 is deeply involved in communication control, including fallback, so it is very easy to break your internet connection due to incorrect settings. It is advisable to leave the default settings unless it is absolutely not necessary.

(mwan3 maintains LuCI but is not included in the image by default. It may have been intentionally omitted for safety to prevent accidental touching.)

I noticed this topic, so I’ll leave a note too,
/etc/config/mwan3 has its own metric (connection priority), and mwan3 relies solely on this to determine the preferred connection and promote it. As a result, high metric connections often prioritized.
However, keep in mind that mwan3 is deeply involved in communication control, including fallback, so it is very easy to break your internet connection due to incorrect settings. It is advisable to leave the default settings unless it is absolutely not necessary.

(mwan3 maintains LuCI but is not included in the image by default. It may have been intentionally omitted for safety to prevent accidental touching.)