BGP - Advertise a prefix to only one upstream

Hello,

I have two upstreams that they provide me a BGP session to advertise my prefixes.

I have multiple prefixes.

I want, advertise some prefixes to one upstream and other prefixes to the other.

How to do?

For example:

Prefix: 1.1.1.0/24 advertise to AS1
Prefix: 2.2.2.0/24 advertise to AS2
Prefix: 3.3.3.0/24 advertise to AS1 and AS2

Currently what I have is:

/routing filter
add action=accept chain=AS1-IN prefix=0.0.0.0/0
add action=accept chain=AS1-OUT prefix=1.1.1.0/24
add action=accept chain=AS1-OUT prefix=3.3.3.0/24
add action=discard chain=AS1-OUT
add action=accept chain=AS2-IN prefix=0.0.0.0/0
add action=accept chain=AS2-OUT prefix=2.2.2.0/24
add action=accept chain=AS2-OUT prefix=3.3.3.0/24
add action=discard chain=AS2-OUT

But I’m doing something wrong… bacause filters don’t take effect.
2.2.2.0/24 is also going on AS1
and 1.1.1.0/24 is also going on AS2

I’ve tried to disable all filters, and don’t take effect… all is running “fine” → All networks work on all upstreams.

Thanks in advance!

Your out filters are correct… if the only problem is that you are still advertising all of your prefixes to both providers, then I suggest you bounce one of the BGP sessions to confirm the filters taking affect (this is the brute force way of doing it).

Did you apply the filters to your BGP peers as out-filter and reset the BGP sessions ?