Using bandwidth monitoring to set default gateway

Hi there!
Considering the router has two WAN interfaces, eg. two different sim cards, I am looking for a way to automatically switch the default gateway if the bandwidth of one interface does not meet a given criteria.

I checked out the mwan3 package but afaik this is solely based on ping tests and their latency & packet loss. I am not sure if I can tune the settings fine enough for my use case.

For example; a CCTV video is streamed 24/7 and needs a constant bandwidth of 2MB (because the current framerate & video quality demand it) at least to prevent lags. If the mobile connection of the default gateway now has reduced bandwidth below 2MB for any reason, the stream should continue over the second gateway, as this uses a different mobile connection which is more stable at the moment.

Is this somehow possible?
Thx & BR, Chris

problem is to measure it, since the bandwidth isn't constant ...

1 Like

Ok, make sense to me.
The idea which came to mind first, was to repeatedly use a tool to measure the bandwidth (such as iperf or something) in intervals (eg. hourly) and switch the default gateway depending on the result.
However this is irrelevant as the "available bandwidth" can change any second and we keep on measuring continuously..

That would cause serious bandwidth usage for the tests alone, rarely acceptable on an LTE link.