Recursive routing and failover setup making use of it is one among the many commonly needed features of a router that is - BTW like most useful things possible in RouterOS - either mis-documented or documented in such a complex and convolute way that bears of little brain like myself simply cannot grasp in their entirety.
By applying a (rest assured moderate) amount of torture to knowledgeable member CGGXANNX (whom I want to thank for the patience and the will to discuss and explain the matter) I managed to squeeze out of him the essential informations needed to create a simple recursive route that is also formally correct.
Only for the record there is an even simpler mnemonic method that - while working in most cases - is not correct, as it relies on RouterOS automagicallly correcting scope values of routes, a link to it is given here ONLY for reference, you should instead use the one described in the attached spreadsheet, anyway, for reference only, start from here:
Primary gateway with static ip address not activating - #17 by jaclaz
The approach used in the attached spreadsheet is a simple, practical, method that can be used and replicated without needing to understand fully the complexities of the way the values of scope and target-scope in routes play a crucial role in recursive routing.
People willing to better understand the matter can use (and peruse) the thread where this originated, with particular attention to posts by CGGXANNX, starting from here:
Anyway, here is a screenshot of last version (0.4):
and attached here is the original spreadsheet (also 0.4) in a .zip archive:
recursive.zip (8.5 KB)
As always, comments, corrections, (possibly constructive) critics are welcome.
EDIT:
Replaced files with latest version, 0.3 2025-12-19
Replaced files with latest version, 0.4 2025-12-20
