Community discussions

MikroTik App
 
vk7zms
Member Candidate
Member Candidate
Topic Author
Posts: 227
Joined: Thu Jun 29, 2006 3:01 am
Location: Hobart, Tasmania
Contact:

BGP route filtering

Thu Jan 29, 2009 4:07 am

Hi, I am running BGP internally on my network - this works well most of the times, however there are two things I can't work out how to do

with "advertise connected" routes enabled, I want to be able to filter out a specific route so it is not advertised at all. This is usually a subnet attached to an Ethernet interface that is masqueraded onto the larger network.

Example1

interface IP addresses
Wlan1 172.20.20.5/30
Wlan2 172.20.20.9/30
Ether1 192.168.0.1/24

I would like the router to collect routes and advertise routes on Wlan1 & Wlan2, but not advertise 192.168.0.0/24 that is bound to Ether1

Any assistance in accomplishing this would be greatly appreciated
 
User avatar
mrz
MikroTik Support
MikroTik Support
Posts: 7198
Joined: Wed Feb 07, 2007 12:45 pm
Location: Latvia
Contact:

Re: BGP route filtering

Thu Jan 29, 2009 10:19 am

*) set out-filter in bgp peers configuration
*) add routing filter
/routing filter add chain=<out-filter-name> prefix=192.168.0.0/24 action=discard
 
vk7zms
Member Candidate
Member Candidate
Topic Author
Posts: 227
Joined: Thu Jun 29, 2006 3:01 am
Location: Hobart, Tasmania
Contact:

Re: BGP route filtering

Thu Feb 05, 2009 11:46 am

Excellent - thanks for that - much appreciated
 
vk7zms
Member Candidate
Member Candidate
Topic Author
Posts: 227
Joined: Thu Jun 29, 2006 3:01 am
Location: Hobart, Tasmania
Contact:

Re: BGP route filtering

Mon Feb 09, 2009 10:34 am

Is it possible to add a list of prefixes to a filter

for example filter out

192.168.0.0/16
10.0.0.0/8
172.18.0.0/24
 
User avatar
Chupaka
Forum Guru
Forum Guru
Posts: 8712
Joined: Mon Jun 19, 2006 11:15 pm
Location: Minsk, Belarus
Contact:

Re: BGP route filtering

Wed Feb 11, 2009 1:05 am

/routing filter add chain=<out-filter-name> prefix=192.168.0.0/24 action=discard
/routing filter add chain=<out-filter-name> prefix=10.0.0.0/8 action=discard
/routing filter add chain=<out-filter-name> prefix=172.18.0.0/24 action=discard

=)
 
NenadS
just joined
Posts: 13
Joined: Wed May 31, 2006 4:39 pm

Re: BGP route filtering

Sat Jul 18, 2009 12:28 pm

Hi all :)

When I do the same but only for OSPF nothing is happened :(

R1:

/routing filter add chain=ospf-out prefix=192.168.0.0/24 type=connect action=discard

Route 192.168.0.0/24 still appears on my R2...

Is there any additional config for OSPF for route filter?

Thanks
 
User avatar
mrz
MikroTik Support
MikroTik Support
Posts: 7198
Joined: Wed Feb 07, 2007 12:45 pm
Location: Latvia
Contact:

Re: BGP route filtering

Mon Jul 20, 2009 9:02 am

remove type=connect
 
NenadS
just joined
Posts: 13
Joined: Wed May 31, 2006 4:39 pm

Re: BGP route filtering

Tue Jul 21, 2009 1:22 pm

Thanks a lot, I'll try that :)