Community discussions

MikroTik App
 
midsizewisp
Frequent Visitor
Frequent Visitor
Topic Author
Posts: 55
Joined: Tue Dec 08, 2009 10:34 pm

Route Filters Not Working

Mon May 02, 2011 11:12 pm

I'm trying to setup router filters on V5.0 and V5.0rc10 with BGP and they aren't working.
When I try to limit EVERYTHING, I'm still getting all the routes coming through.
What am I doing wrong?

Router 1:
add address-families=ip as-override=no default-originate=never disabled=yes \
hold-time=3m in-filter=just_peers_in instance=default multihop=no name=Peer2 \
nexthop-choice=default out-filter=just_peers_out passive=no remote-address=\
192.168.1.2 remote-as=2 remove-private-as=no route-reflect=no tcp-md5-key=\
"" ttl=default use-bfd=no

Router 2:
add address-families=ip as-override=no default-originate=never disabled=yes \
hold-time=3m in-filter=just_peers_in instance=default multihop=no name=\
Peer1 nexthop-choice=default out-filter=just_peers_out passive=no \
remote-address=192.168.1.1 remote-as=1 remove-private-as=no \
route-reflect=no tcp-md5-key="" ttl=default use-bfd=no

Route filters are the same on both:
add action=reject chain=just_peers_in disabled=no invert-match=no prefix=0.0.0.0
add action=reject chain=just_peers_out disabled=no invert-match=no prefix=0.0.0.0
 
fewi
Forum Guru
Forum Guru
Posts: 7717
Joined: Tue Aug 11, 2009 3:19 am

Re: Route Filters Not Working

Tue May 03, 2011 12:19 am

0.0.0.0 as a prefix with no prefix-length set matches exactly. If you want to filter all routes, don't set a prefix at all and set the action to 'reject' or 'discard'. With an action of 'reject' routes for the inbound direction will go into the routing table, but will not be eligible to become active. If you don't want to see them at all, use 'discard'. Your example filter would work with 'prefix' set to nothing.

For other examples see http://wiki.mikrotik.com/wiki/Manual:Si ... ng_Filters

Who is online

Users browsing this forum: Bing [Bot] and 17 guests