Any plans “discard” action to be implemented soon ?
Any plans “numbering order” to be fixed via winbox ?
More details in help.mikrotik.com for filtering will be nice
Look like filtering is not fully completed yet.
Any plans “discard” action to be implemented soon ?
Any plans “numbering order” to be fixed via winbox ?
More details in help.mikrotik.com for filtering will be nice
Look like filtering is not fully completed yet.
Be more specific what examples you would like to see.
There will be no “discard”, to accept only specific NLRIs you should use BGP “input.accept-*” parameters.
Is there a way to get the below filter to work on 7.1+
/routing filter
add action=accept chain=dynamic-in distance=18 prefix=0.0.0.0/0 prefix-length=0 set-distance=1 set-routing-mark=Starlink
More related when redistribute connected routes with OSPF
For example to remove (not installed in routing table / redistributed via ospf) netowrk/prefix with ospf ros6
1 chain=ospf-out prefix=10.10.0.0/16 prefix-length=0-32 invert-match=no action=discard set-bgp-prepend-path=""
2 chain=ospf-in prefix=10.10.0.0/16 prefix-length=0-32 invert-match=no action=discard set-bgp-prepend-path=""
I don’t have a lot of experience with filters but this work for me with ros6, is there something similar to be done in ros7 ?
@jspool, there is no dynamic-in chain in ROSv7
something like
/routing/filter/rule/add chain=ospf-in rule="if (dst in 10.10.0.0/16 && dst-len in [0-32]) { reject}"
Ok I’m little confused .. sorry
I want the exact opposite result !
At the moment I’m using in ROS7
chain=ospf-out rule="if (dst in 10.10.0.0/16 && dst-len > 24) { reject }"
however this still add all routes in this range in MAIN routing table as inactive / filtered
with my example for ROS6 and “action=discard” filtered routes are REMOVED from MAIN rutting table … or NOT redistributed via OSPF (I redistribute connected routes )
I hope I was able to explain my question correctly
Regards,
Yes sorry type, it was meant to be reject.
As was mentioned previously there is no “discard”. Those routes will appear in the routing table as “filtered” and by default will not be redistributed further.
Ohh ok so no way to remove them from MAIN, I have only ~40 routes in MAIN and is not a big issue, however for some users with more entries this can be somehow frustrating.
I guess this is more /ip/route print (or winbox) output only, (from visual prospective)
In winbox we have “Active is yes” which is ok
Any way thanks for the quick answer !
If you have a lot of OSPF routes that you need to drop then possibly right way is to rethink your network design, but do not drop routes by filters. Possibly use multiple areas and area ranges.
If it’s used to change parameters of default route from dhcp, you can add static one (1.1.1.1 is any random address, it won’t be used):
/ip route add dst-address=0.0.0.0/0 gateway=1.1.1.1 comment=dhcp1 routing-table=Starlink disabled=yes
Then set add-default-route=no for dhcp client and use lease script to update the route you added, e.g.:
:if ($bound=1) do={
/ip route set [find where comment="dhcp1"] gateway=$"gateway-address" disabled=no
} else={
/ip route set [find where comment="dhcp1"] disabled=yes
}
![]()
Yep I know but sometimes redistributing connected routes between remote sites is the easy/lazy way (in small net)