Page 1 of 1

Create BGP communities

Posted: Wed May 01, 2019 12:41 pm
by jmginer
Hello,

I offer IP Transit over BGP and would like to create communities for my customers and for them to choose which of my upstreams to advertise their prefixes.

Is this possible with Mikrotik?

Thank you!

Re: Create BGP communities  [SOLVED]

Posted: Wed May 01, 2019 2:11 pm
by joegoldman
yes, you dont 'create' communities, routes are tagged with community strings. So when you receive routes from a downstream peer, then when distributing upstream you use route filters community option to decide what to do with them, i.e. can block all routes with community 111:222 or whatever you choose.

You just decide on the arbitrary community strings you want for different options, set up your route filters for doing that, then tell your downstreams. Sometimes your upstream provides communities too, common one is <ASN>:666 for RTBH, which is good to set up your own, and sometimes requires you to 'rewrite' the community string on redistribution from your RTBH string to your upstreams RTBH string.

Re: Create BGP communities

Posted: Wed May 01, 2019 8:37 pm
by sri2007
Hello, yes you can set communities using RouterOS easily, those can be done using route-filters, you can check that here:

https://wiki.mikrotik.com/wiki/Manual:R ... ng_filters

Summary version, there is a set-bgp-community & append-bgp-community that can work for you.

Re: Create BGP communities

Posted: Wed May 01, 2019 9:16 pm
by jmginer
Thanks @joegoldman @sri2007, I think I got it:
add action=discard bgp-communities=myAS:1000 chain=DECIX-OUT prefix-length=0-128 comment="Dont advertise to DECIX"
With this filter rule, when my downstream advertise me a prfix with the comm myAS:1000 my router don't re-advertise to DECIX.

I've placed this filter rule on the top of my filter rules.