If the response packet isn't received after timeout (5 sec), you might try second wan1 (3.3.3.1)
if the response is received - add a temporary record to the routing table (or in the memory address list) to use wan1 for that IP.
This should avoid keeping or maintaining the full routing table for the second wan1. Learn routes instead of listing, less memory & CPU.
To achieve such functionality, MikrotikOS should just keep track of IP connections, that have not received IP packets in response after timeout (it might keep them for a minute or so until the script is able to check accessibility through multi-wan and convert those entries to routes or address list records).
Something close to:
Code: Select all
/ip firewall connection print where dst-address~"192.0.2.1" and !seen-reply and repl-packets=0
/ip firewall connection print where !seen-reply and tcp-state="syn-sent"