Multiple prefixes to peers

Hello,
I’ve been looking through the forums/wiki on and off the past few weeks for information, but I’m having a few problems understanding how to implement.

I have BGP sessions configured for peering and for my upstream transit providers. I’m only advertising a single prefix using my filter. The filter is configured as follows:

Chain: to-peers
Prefix: 20.20.20.0/22
INVERT MATCH
Action: DISCARD

The filter basically instructs that any other routes that my router might advertised are to be dropped. I now have to add a second prefix to be advertised and I’m pretty sure that adding the second prefix in the same fashion as the above filter won’t work as Mikrotik executes from top to bottom on the filter list and the first filter rule drops everything but 20.20.20.0/22

Can someone please spell this out for me?

you have to add three rules:
*) accept first prefix
*) accept other prefix
*) drop the rest

Thank-you, that makes sense to me. I have another question however. Do I need to set up multiple BGP instances to have different filter rules for different peers?

In some cases, I simply want to peer and advertise my prefix(es) only. In another case (not instance) I would like to provide full-routes to a customer of mine via BGP.

I understand that a filter set can be attached to a peer under (BGP Peer - Out Fiter) - but it seems that in my case the main default BGP instance is requiring me to apply a filter (globally?). As a result of this, it seems that the single instance is forcing me to apply a filter rule to all of my peers. Maybe I could setup a blank filter rule? Not sure - this application on a global level to all my peers/transit seems very problematic to me.

Thanks again for anyone who can help me further.

No, you don’t need multiple instances.

Specify in peers configuration in-filter, out-filter and use those chains to filter out prefixes for specific peer.

That was what I thought, however under BGP-Instances, the default instance is ‘forcing’ me to pick a Out Filter it seems. Does this seem ‘normal’ to you?

Does specifying an out filter in a peer override the out filter selected in the BGP instance?

No, it will not override anything.

First is instance filters used and then peer’s filters. So you must set up filters carefully.

BTW this is also mentioned int the manual:
http://wiki.mikrotik.com/wiki/Manual:Routing/BGP#Peer