subscribe to our Youtube


14455 questions

17168 answers


0 members

We are migrating to our new platform at Moving forward, you can continue discussions on this new platform. This current platform will be temporarily maintained for reference purposes.
0 votes
260 views 3 comments
by anonymous
I have a RUTX12 set up with failover between two different carriers. Scenario:

I have a running connection on Sim 1 and I physically pull out the sim 1 card of the router. The RUTX12 then immediately switches over to Sim 2 with almost no connection loss. Great!

However, if I want to use Sim 2 without physically removing Sim 1, I need to change the order of the interfaces, right? That would work for me, expect that when I do that and click Apply & Save, the router seems to restart all interfaces, the modems lose connection and reconnect to the cell towers. This means I get a complete loss of connection until the sims are up and running again.

What can I do to switch between the sims without restarting all interfaces? Like a "manual failover".

1 Answer

0 votes
by anonymous


Instead of restarting both interfaces, you could try restarting only the interface you want to switch from. This could be achieved via a few SSH commands. For example, to switch from SIM1 to SIM2, use the following:

uci set mwan3.mob2s1a1_member_mwan.metric='1'
uci set mwan3.mob1s1a1_member_mwan.metric='2'
uci commit
ubus call mobifd.modem0 reload

Switching the other way around would look like:

uci set mwan3.mob2s1a1_member_mwan.metric='2'
uci set mwan3.mob1s1a1_member_mwan.metric='1'
uci commit
ubus call mobifd.modem1 reload

The above command groups can be placed in separate script files and executed as single commands.

Best regards,

Best answer
by anonymous
This does indeed seem to work! However, after changing with these commands, the order in Interfaces seems to be unchanged? But maybe I am misunderstanding what the commands do. Do they not change the order? The first two commands seems to indicate this.
by anonymous
After messing around a little more, I think the commands change the order of the failover list, not the Interfaces list. And I now tried changing the order of the failover list on the webUI, which seems to work just as well as the scripts do. In other words: Changing the order in failover will switch which modem is being used without restarting all interfaces. No need to use scripts for this, unless you want to run these commands from something other than the webUI.
by anonymous

That is indeed correct, commands simply change the metrics in Failover settings. A modem reload is needed to flush current connections in order to reestablish them through the new primary WAN interface, but this applies only, if you have each interface configured to flush connections on interface connect/disconnect events:

Having a script provides an advantage of remote (for example, using custom rules in SMS utilities) or periodic (using crontabs)  interface priority change.

Best regards,