Automatic link fail-over

hi,

I am using Mikrotik Cloud Router. I have connected my router with two connection. primary is fiber and seconadary is Wifi on WAN side.
And on lan side hotspot is configured for 6 ports.i want to use one connection at a time. for example fiber.
Now i want that when fiber down after 5 timeout automatic link shift to WIFI and when the fiber up it shift to fiber automatically.
if any one have idea.kindly help me. i shall be very thankful.

in your ip → routes add two new routes for default gateway, one for your fiber with distance=1 and one for your wifi with distance=2, so everytime fiber gateway is down, it will automatically shift to your wifi gateway, and when your fiber gateway is back again automatically it will change back to your main gateway.

I am using two interface for that. one for fiber and one wifi.It will work on that. distance 1 for fiber and distance 2 for wifi.

I will do that and then will reply you

thanks

hi,

Its not shifting automatically because the fiber gateway is up and net was down from third hope.

Then you have to do it with a script-scheduler.

You have to check the main gateway ip, of the fiber gateway, by ping command.
If not ping to this ip, then change to your second gateway.
If ping is ok, then change to your main fiber gateway.