Configuring multiple internet connection priority


I’m fairly well versed in all things computer, but my networking skills are both rusty and limited.

I have a GL.iNet GL-MT300N. We have very slow rural DSL (1.2 Mbps) connected to the WAN port. The LAN port is connected to a switch with several ethernet peripherals on it. I connect my phone via USB tether 4G to the GL-MT300N for the household to use, but only when I’m home.

As it’s configured now, WAN port has priority, and if I connect my phone tethering at the same time, it keeps using the slow WAN as internet, and I have to manually go downstairs and pull the WAN plug. If I forget to plug it back in, and then take my phone and leave, things get dicey with my family. :grin:

I want to set it up so that:

  • Internet priority is USB tethering, but when I disconnect my phone, I want it to use the WAN as backup. When I re-tether my phone, I want the router to switch back to that automatically.

Can anyone help me achieve this? I already have mwan3 and LUci installed, but I don’t see any way to do anything with the different internet connections that would allow me to prioritize them in the way I want.

Any help would be greatly appreciated, so thanks in advance!!

1 Like

Here’s an diagram of the network.

You ssh to the router and edit this file


You can find there is a option metric in each interface. The values should be 10, 20, 30, 40

A low value mean priority. You can adjust and try.

There is metric value in /etc/config/mwan3

But the values in network should take effect.


I am also trying to do this I want to use a hotspot when my cable stops working… then give priority to my cable modem when it comes back online how do I do this?

1 Like

This is the default settings and you do not need to do anyting.

On my GL-S1300, WAN (Ethernet) and WWAN (WiFi 4G dongle) are active. WAN is priority 20 by default, WAN priority 10 by default. I have a monthly limit on WAN and would like to auto-switch to WWAN if my phone HOTSPOT is turned on.

The hotspot works and becomes active in the GL-S1300 main page automatically when I tun the phone hotspot on, BUT the WWAN WILL NOTtake over even after changing the metric (/etc/config/network) for WWAN to 9 (ie lower than WAN) and rebooting to be sure. WWAN will only take over if WAN is actually disconnected at the wall.

STOP PRESS… Adjusting values in /etc/config/mwan3 fixed it for me AND I didn’t need to reboot. SO, looking in MWAN3…
config member ‘wan_only’
option interface ‘wan’
option metric ‘2’
option weight ‘3’

config member ‘wwan_only’
option interface ‘wwan’
option metric ‘1’
option weight ‘3’
If you notice I’ve swapped over the METRIC value (nothing else) so that WWAN is metric “1” and WAN is metric “2” that’s all I needed. So now my phone HOTSPOT will take over when it is on, if it is off, the GL-S1300 (and so I guess any similar router based on OpenWRT) router reverts to the normal broadband.

MAGIC - I hope this helps others. Now all I need do is find a way to get the router to connect to the HotSpot 100% of the time - it does so 90%+ of the time without me having to pick the SAVED NETWORK, but opccasionally it doesn’t bother. Anyone messing with a similar situation may find THIS interesting. I’m writing everything up on my blog. Broadband or 4G / 5G mobile? That is the Question! - Scargill's Tech Blog - I hope that is helpful.