I have very simple question but unfortunatly I still have not found the answer. Before I start to describe my scenario I would like to say that I have already make a research about this specific scenario but I cant find the answer. Everything was about classic redistribution from static to OSPF.
I have mikrotik with OSPF and Static routes. There are some “S” routes and also “DAS” which stands for dynamic static. I know how to redistribute static routes into OSPF but I need to redistribute only some specific routes from the list of the static routes. I know there is “routing → filter” but I am not sure if this filter works as I think it works.
I achieved only two results. 1. Nothing was redistributed. 2. Every static route was redistributed.
Can someone post me his advice, please?
For instance, in cisco environment I can use “route-map” with “access-list” or “prefix-list” defining which specific static route I want to redistribute.
Suddenly realized I was a bit misleading here. That discard rule will only match the exact route of 192.168.0.0/16, not a more specific one like 192.168.1.0/24 .. to match all routes inside a larger netmask that you would need to also set a prefix-length for the filter entry.
I have already tried this before. I just renamed the filter “ospf-out” to something other, but I guess this is not a problem. Next, I had prefix and prefix-length with action accept. The next rule was deny everything else. I did this in the same way as you suggested me right now. But the result was very strange. There was blocked everything. It was like the filter skipped the first rule.
I tested it in other ways but as I wrote earlier, I achieved only two situations = either everything was blocked or eveerything was allowed.
@martinb
I believe the name is a problem. There are some predifined chains and for ospf are ospf-in and ospf-out and I believe you will have to use those to filter in OSPF