I am wondering what the most elegant approach is to disable the IPv6 prefix advertising on a LAN interface in case the upstream is gone and the default gateway is unreachable.
For routes, e.g. the default route in this case, there is
check-gateway
which can be used to determine if the next hop can still be reached.
I would like to go one step further and also stop advertising (and deprecate) the prefixes on the internal interfaces.
In my case the prefix is statically delegated, so there is no dynamic pool (via DHCPv6 PD), but a static pool (/48) - if that makes any difference.
If you wonder what the use case behind this might be:
There are two upstreams, each with a different provider and therefore delegated prefix. So the internal clients, via SLAAC, actually have two addresses each.
In case one of the internet uplinks goes down, clients should quickly exclusively use the prefix (provider) that still provides connectivity to the internet.
When advertising is disabled on prefix it will be actively deprecated (https://help.mikrotik.com/docs/display/ROS/IP+Addressing#IPAddressing-IPv6Addressing).
Is there any regular configuration that can be done to achieve this kind of mechanism? Or is there scripting required? If so, does anybody have any code / script at hand to point me into the right direction?
Edit:
I suppose for continuous health checking of the internet uplink Netwatch (https://help.mikrotik.com/docs/display/ROS/Netwatch) is a good start.
Then the only think left is to disable the prefix advertising on the particular address I suppose?