OSPF redistribute and routing filters in v7

Trying to set up lab on 7.1.beta5
I simply want to redistribute loopback addresses into ospf, but by default it does not work.
Started to set up filters, but they do not work as said in https://help.mikrotik.com/docs/display/ROS/ROSv7+Basic+Routing+Examples

[admin@R1] > routing/filter/rule/add chain=ospf_out                                
failure: empty rule specified
[admin@R1] > routing/filter/rule/add chain=ospf_out rule="dst<subsumes>10.0.0.0/8"
failure: invalid action at dst

Maybe someone knows?

The syntax for routing filters has changed:

Details here:

http://forum.mikrotik.com/t/v7-1beta5-development-is-released/147722/1

I’d expect something like:

/routing/filter/rule/add chain=ospf-redist rule={if [protocol connected] then={action do=accept}}

Thanks, but I still can’t understand how to use that “chains” or “select chains”

Can you please show full config for “redistribute static/connected with some filtering” scenario?

Just need to specify chain in instance and add one rule.

/routing ospf instance set <xxx> out-filter-chain=myChain
/routing filter rule add chain=myChain rule={ if ([protocol connected]) then={num-value ospf-ext-metric<assign>10; ospf-ext-type type1; action accept}}

Ok, it looks working now.
What for are select-chain and select-rule?

And please help to figure out how to filter by prefix and prefix length?

How would make equivalent of this?

  • redistribute default route - never
  • redistribute connected routes - as type 1
  • redistribute static routes - as type 1

Can it be like this?:

0 chain=final rule=if ([protocol connected] || [protocol static]) then={action do=accept; ospf-ext-type type1}

1 chain=final rule=if ([prfx-value is=dst0.0.0.0/0] || [protocol static]) then={action do=reject}

Firsts reject default route and then accept static,connected

or you can write in one rule

if ([prfx-value is=!dst<equal>0.0.0.0/0] || [protocol static] || [protocol connected]) { ospf-ext-type type1; action accept}

Thank you mrz!

Some more info on new filter syntax now is available here:
https://help.mikrotik.com/docs/display/ROS/ROSv7+Basic+Routing+Examples

How can I set ospf cost? Before it was just "routing ospf area set default-cost=

I just cannot find it enywhere.