Testing of an untypical spare link

Hi, I have a problem, I have done on the mikrotik switching to the backup link, so far manually, I change the master port from “3_MAIN” to “2_BACKUP”, I would like to make this automatic.
The problem is that I get from the provider 16 addresses and a few I use, the gateway address is for example 111.222.333.1 (provider), when switching to the backup link (dhcp) I do nat to the address I get from the main provider (111.222.333.1).
My question is: what to configure to ping through the main provider link, in both cases (when i work on main link and if i work on backup), I have to do this for 1 external address from the main provider eg 111.222.333.6.

configuration looks like this:

/interface ethernet
set [ find default-name=ether1 ] name=1_orange
set [ find default-name=ether2 ] name=2_BACKUP poe-out=off
set [ find default-name=ether3 ] name=3_MAIN poe-out=off
set [ find default-name=ether4 ] master-port=3_MAIN name=4_LOCAL_NET poe-out=off
set [ find default-name=ether5 ] name=5_lokal-access poe-out=off
set [ find default-name=sfp1 ] disabled=yes
/ip address
add address=111.222.333.1/28 interface=2_BACKUP network=111.222.333.0
/ip dhcp-client
add dhcp-options=hostname,clientid disabled=no interface=1_orange
/ip firewall nat
add action=masquerade chain=srcnat out-interface=1_orange

Hello,

I am sorry if I made a mistake.

Is it normal to recognize that you want to use “3_MAIN” and switch to “2_BACKUP” if there is something wrong?
If you do not consider WAN loadbalance or ECMP and only simple failover, you just need to change the distance of “/ ip route”.

The smaller number takes precedence.

/ip route
add check-gateway=ping distance=1 gateway=3_MAIN
add check-gateway=ping distance=2 gateway=2_BACKUP

https://wiki.mikrotik.com/index.php?title=Manual:IP/Route&redirect=no#Criteria_for_selecting_candidate_routes