Two routers two WANs (WAN and LTE) failover help needed

Hello experts.

I’m having such configuration:
Remont Home Scheme New.png
Primary router is rb4011igs+5hacq2hnd-in, second router is hEX PoE RB960PGS to control 3 repeaters cAP lite (RBcAPL-2nD). I have 250Mbs WAN connected to Eth1 to primary router and LTE modem as USB stick LTE HUAWEI E3372h connected to secondary router. They are powered by Back-UPS when electricity is off.

Please help me with configuration - how can I handle failover - when primary WAN is out (or when equipment is on Back-UPS so no WAN at all) I can use internet from LTE?

I’ve seen a number of scripts to handle such case when 1-2-3 WANs and/or LTE connected to router but no cases when there are two or more routers and each has its own WAN to handle failover from each others.

Any help appreciate!

Well you have no backup on the primary router?
So you only need backup up for the hex router?

If you wanted backup for the whole system you would put the LTE on the first router and then apply rules as necessary the hex could remain as a router or not depending on what the actual purpose of that in router mode is for?

Not sure what you want??

In any case lets say it was two isps and two routers…
The only thing I can think of is possibly putting a dedicated vlan between the hex on an isolated port to an isolated port on the first router and call that ISP2 incoming for the main router
Assuming your hex router is acting as a router then its ISP1 is the first router over an existing port and thus the existing separate LTE port you have is ISP2 for the hex.

It just seems awkward to have two separate routers when I dont understand why the complication??

Yes - second as backup

RB4011 has no USB so I’m unable to plug in USB LTE stick and can use it only on second one.

Yep - one ISP on first one and on second will be second ISP.

From what I found the solution could be to use VRRP and OSPF. So VRRP creates one virtual router which has 2 ISPs and OSPF manages traffic. But I’m quite new to MikrtoTik to manage everything by myself. I’m trying to understand it, but would like any help to setup or some links to guides on that.

Thank you anyway for reply.

Okay so I didnt understand why the USB stick was plugged into the hex and not the RB4… lack of USB port.
So you have one option but there is a big assumption***
If you want backup for both routers…

HEX isp1 = Main router (wanip of hex = lanip on Main given to hex - static)
HEX isp2 = usb port

Main router ISP1 = current setup
Main router ISP2 = ether yy on Main router (on a vlan physically connected to port ss on the hex)

***On hex associate usb port and port ss to be on same vlan if possible - can they be bridged???

Also keep in mind that should internet access fail over to USB LTE connection, you will lose incoming traffic such as port forwarding, VPN, etc