WAN failover to internal 4G


I'm looking for guidance on implementing WAN failover to the internal 4G modem of my TP-Link MR6400. The closest documentation I could find for my concern uses a second 3G router but what I am aiming for is to use the wired connection as primary and use the router's internal 4G modem as secondary. I have also seen some documentation about mwan3 but I'm not sure how to implement that for the setup I have in mind.

Can anyone help me with this? Any input would be greatly appreciated. Thank you.

mwan3 is apparently the wrong tool here. The problem is that it only modifies the routing table (i.e. essentially requires the 4g connection to be always up), while for the "4g backup" use case, to avoid extra bills if your billing is based on days of usage, you need to bring the 4g connection up and down as needed. Possibly this can be done from the /etc/mwan3.user hotplug shell script, but this setup is not documented anywhere.

And unfortunately the right tool does not seem to exist either.

I am using my LTE connection as backup to the primary wan with mwan3.
I am not sure what expectations you have and why do you think it won't work for you, so maybe you could explain a bit better?

Hey @trendy , I'm interested to know how you configured your LTE connection as backup using mwan3.

I couldn't find guidance on how to do it, neither via the command line nor using the web UI. Can you share how you did it?

For the beginning:

Having WWAN as backup for WAN is the basic setup.

1 Like

This is the old wiki. The current wiki is here.

@markLopez9 it's nothing complicated. From the wiki example use wan for your main connection and wanb for the backup wwan. Then for the default rule use policy wan_wanb instead of balanced. You may want to fine tune the wanb interface to reduce the control traffic in case you don't have unlimited data tariff.


This won't work for me. I don't have unlimited data, but the operator also charges money every day for the very fact that I had internet connected (even if zero bytes are transferred). I.e. on days when the primary line is up, the LTE connection should be down, which is not the same as "up but unused".

That's sad, but anyway doesn't justify to immediately reject mwan3 as a viable solution.

Thanks @reinerotto and @trendy I'll sift through these to make it work.

Greatly appreciated, both of you. :smiley: