Hello,
is there any simple way how to exclude specific IP address from default route? I can imagine to mangle according to destination ip and then exclude the routing mark from default route. But is it possible to do it without mangling?
Anyway, I checked it again and it seems that it is not possible to exclude the routing mark. It would be necessary to mark all traffic, and just selected destination keep without routing mark and then add the routing mark to the default route as positive condition. This is something I would not want to do .
Yes, I am using specific routing for this ip, but it is linked to certain interface. When the interface is down, the route is disabled, so the traffic goes by default route, therefore I want to exclude it.
You can use a rule in /IP Route. Mark the explicit rule with a routing mark and set a rule to use that routing mark/table only for the specific target.
As I wrote, I already have such special route. The problem is, when it becomes inactive. Then the default route takes also this traffic, therefore I want to exclude it.
I have another idea. Make additional route with higher distance for my distance and use 127.0.0.1 as GW. It should become active in case the own special route goes inactive and it could exclude the traffic effectively.
Try posting your config. Using a routing rule with action “lookup only in table” should be able to achieve this. It should the return “destination net unreachable” if the interface for the explicit route is down.
I owe response here. Thank you for your willingness first. I solved my problem by creating additional route for that destination with blackhole type and higher distance. In case the main route is not accessible, it deactivates the real route and then this fictive blackhole route takes its place and discards the packets as I wanted.
Hope it helps someone.
Glad that solved the problem. If you want RouterOS to only use routes in a particular VRF (routing-mark) you can always use routing rules to force it to do so.