WAN interface monitoring failover

In the company where I work, we have two WAN one as “Active” by fiber service e one as “Backup” by WIMAX service.

Our ISP give us two preconfigured router, one for the fiber and one for the WIMAX, both have the same public IP x.y.z.1 configured to WAN interface as default gateway.

When fiber link is active:

Router 1 route the IN/OUT traffic with our x.y.z.0/28 public IP and can reach internet IPs

Router 2 respond only by x.y.z.1 public IP

When fiber link is down:

Router 1 respond only by x.y.z.1 public IP

Router 2 route the IN/OUT traffic with our x.y.z.0/28 public IP and can reach internet IPs

Our firewall has the WAN port with x.y.z.2 IP configured and x.y.z.1 as gateway. The port as alias IP from x.y.z.3 to 14 to forward other services.

It can handle active/backup WANs but not with same IP interface.

So what I need is a device with 3 interfaces bridged

Interface1 to the Fiber router WAN port

Interface2 to the WIMAX router WAN port

Interface3 to the Firewall WAN port

The interface1 should be active while can ping 1.1.1.1 and interface2 disabled.

If it fails interface2 became active and the interface1 is disabled.

I know that Fortigate have an HA link-monitoring way to handle that situation.

Does VyOS can do the job?

Not quite shure. I would think dual wan setup from documentation and then a custom check script.

The dual wan will then make a failover between interface1 and interface2.

Hope that helps pointing to the right direction.