problem route fitering a subnet

Hi all.
I have some routes coming from bgp like:
10.83.1.0/24

10.83.200.0/24

If I apply to ebgp connection this filter:
/chain=drop10 prefix=10.83.1.0/24 action=discard

it correctly remove the corresponding route.

If I apply this filter
/chain=drop10 prefix=10.0.0.0/8 action=discard
or
/chain=drop10 prefix=10.0.0.0 prefix-len=0..8 action=discard
or
/chain=drop10 prefix=10.0.0.0 prefix-len=9..32 action=discard

it drop nothing.

How it is possibile to write a rule which drops a set of routes?

Thanks

If you expand the filters you have above, none of them will match the routes you’ve listed above.

Can you try the following and see if it matches, please?

/chain=drop10 prefix=10.0.0.0/8 prefix-len=24 action=discard

http://wiki.mikrotik.com/wiki/Manual:Routing/Routing_filters

If network mask is not set, /32 is assumed

Regards,

thanks cupis,
/chain=drop10 prefix=10.0.0.0/8 prefix-len=24 action=discard

works correctly.

now it remains some subnets to filter:

  • 10.245.1.0/29
  • 10 250.1.0/30

is it possible to filter all subnets 10.x.x.x/x ?

Yes, use something like:

/chain=drop10 prefix=10.0.0.0/8 prefix-len=8-32 action=discard

This will filter all routes in 10.0.0.0/8, with any prefix from /8 down to /32.

Regards,

it works!
thanks