Manage Network Interface priority

Hi everyone,

We are developing a gateway device based on the Onion Omega2S+. Our hardware supports WiFi, Ethernet, Cellular, and for web configuration of settings soft AP. We have everything fully functional and are on the home stretch. The last thing to do before we can release this thing is to manage internet connectivity through the 3 different interfaces(Cellular, WiFi, and Ethernet which are interfaces 3g-hologram, apcli0, and eth0 respectively)

We plan to have the user prioritize internet connectivity interfaces or to disable them completely if they wish. So they would put the interfaces in order like:

  1. Ethernet
  2. WiFi
  3. Cellular

I plan to use ping in a script to monitor internet connectivity of the interfaces like:

ping -c 1 -n -w 1 -I eth0 www.google.com

I'll do this on interval for all connectivity options the user has selected to enable. Once I find internet connection on the top priority connection I want to ensure that all internet based requests go over that particular interface. I'm not finding a conclusive way to do this. How can you tell OpenWRT to prioritize a particular interface for internet based requests? I realize that switching the connectivity interface may require resetting network which is completely fine.

I found Mwan3 here which looks like it may do what I'm looking for. @arfett would you concur that Mwan3 would indeed do what I'm looking for?

Thank you