Mwan3 - failover - LTE

Hi there,

i bought an E3372h-320 LTE stick, i configured the interface and it worked well.
if the interface is up & running my default wan connection is not used...

so i want to make something like failover. if my wan connection doesnt work use the lte stick. (and this would be great inform myself maybe by email)

after reserach i figured out it should be possible with mwan3 (installed like the documentation on openwrt)

atm i have still the problem that only my lte stick is used instead of my main wan.

hopefully someone can help.

thank you.

You haven't assigned metrics to the interfaces as the initial step of the guide mentioned.

like always youre right :slight_smile:
thank you so much.

now my 4G interface is still sending

image

is this because of the ping ? how much will this be per month ?

is it possible to use traffic only if the main interface has no internet ?

i thought my config above should make it :frowning:

The default interface tracking method is ping, which will send data to confirm the interface is up, so that is likely the data you are seeing, regardless of metrics. Cost will be relative to your carrier and the amount of usage you have per month or whatever is the agreed contract. It will be a certain amount of MB per month with ping traffic.

You can have interfaces which are not tracked by any method and instead just have a initial state of either offline or online instead.

For what you require to ensure traffic never traverses your LTE connection unless the main WAN is down could be to add some custom event logic to /etc/mwan3.user to only enable the interface when your main WAN is down. This can be achieved, with some examples of hooking into interface events here: https://openwrt.org/docs/guide-user/network/wan/multiwan/mwan3#alertsnotifications

ok thats what i thought. thank you.

i have 5 gb per month, if its just a some mb it its fine. i will check after a month the stats.

yes i found some custom scripts too, to stop/start the whole second interface.

but for now i think i made it :slight_smile: and i will stay with this config. lets see how it works.

thanks @all

No worries. From my experience I have a backup LTE WAN that will rarely get used as I have two failover connections before it and the usage with ping tracking is around a couple hundred MB per month, this is continuous ping tracking with a 10 second interval 24/7. You can increase the interval time so less ping commands are sent thus using less data, but I don't think you'll notice it much.

Alternatively, disable the ping tracking entirely and just use the initial state configuration option and set it to online.

my initial state is already online. is this wrong ?

i made now 1 minutes ping, this should be enough.

i lost my internet only once in the last 10 years but while i was on vacation.... arggh

Nothing wrong, you can disable ping tracking entirely if you wanted and just have it assumed always online instead. Your failover rules then should always use your WAN first.

You can ping some internal IP of your provider, e.g nameserver, smtp, web. Sometimes traffic to these destinations is not counted against your quota.

me again, today i tested everything. i did the ping back to 10 seconds.

after i pulled out the fiber cable, it took 15minutes after openwrt switched to the failover 4g ? is this normal ?

next question im using wireguard but i cant connect while the 4g failover is active.
Edit: maybe it takes a while for dyndns to sync? i will check.

Ok dyndns wasnt the fault. seems like i receive no data after connecting with wireguard to my 4g-wan

any hints ?

Check in Status / Load Balancing / Detail tab which connection is active. As per your settings it will take a maximum of 25 seconds (5 seconds interval times 5 missed replies) to detect an outage.
Is the 4G connection behind cg-nat?

yep thats what i thought.

scenario:
i pull out the main cable from my wan modem . i takes like 3 min. after the state switched to disabled. then it switched back to online (i dont know why) .. then it takes more then 20 minutes then it goes disable again and some seconds later it goes offline.

my 4G internet works only after the main wan is offline.

next question cg-nat (i had to google it) i guess my 4g provider use somthing like this.
that means its not possible for me now to use wireguard, unless i have a fixed ipv4 address? or i have to use a mapping service, right ?

its kinda sad, but atleast my outgoing network works and my homeserver can inform myself.

Regarding the failed interface, you can run logread -f -e mwan3 and follow the events about when the interface is considered down. You might need to make settings more strict if it takes too long to detect the outage.
If you are behind cgnat you cannot have incoming connections, unless your provider opens some ports for you.