Page 1 of 1

BUG - 4-byte ASN and BGP Communities on Route Filters

Posted: Thu Mar 07, 2019 4:19 pm
by christopherh
Hello All,

With setting and configuring BGP Communities, the "bgp-communities", "set-bgp-community", and "append-bgp-communities" properties for Route Filters do not support 4-byte AS numbers (or any AS number over 65535, for that matter). As far as I can tell, this is not limited to a specific model of device, rather it affects RouterOS as a whole. I have also tried to configure it from the terminal/SSH/Telnet, to no avail. Could this please be looked into, or some sort of a statement made that shows that Mikrotik does not support 4-byte AS numbers for BGP communities, as APNIC will not issue 2-byte AS numbers without evidence of non-support.

Thanks,
Christopher H.

Re: BUG - 4-byte ASN and BGP Communities on Route Filters

Posted: Thu Mar 07, 2019 4:31 pm
by mrz
BGP community attribute is limited to 4bytes in total by the standard.
Different parameter is needed, for example large BGP community,which you currently cannot set. It is planned to add in the future, but I cannot tell when exactly.

BTW community is administrative value, it does not mean that community must always match AS number.
In what case you need it? Maybe it is possible to use value that fits in community attribute.

Re: BUG - 4-byte ASN and BGP Communities on Route Filters

Posted: Thu Mar 07, 2019 5:06 pm
by christopherh
When you say that "BGP community attribute is limited to 4bytes in total by the standard", which standard are you referring to? Mikrotik's standard? IANA's standard? It is quite unclear.

Support for 4-byte AS numbers should be considered a priority, as there are a fair few carriers, transit providers and IXes who require you to peer with their 4-byte ASN. Should you wish to use their communities, you'd be in trouble.

From my understanding, if an upstream peer uses (for example) 65540:666 to blackhole routes up to a /32, anyone who uses a Mikrotik router for peering with them cannot blackhole route the prefix using communities. They would have to create a static route, which could get messy.

I intend to use BGP communities to be able to prevent upstream carriers from sending my routes to certain transit and IX providers, as well as allowing me to offer my clients the same featureset. I want to be able to allow my customers the ability to not have their routes filtered through to certain transit and IX providers that I peer with. And no, it is not possible to use a value that fits, as it is common practice to use BGP communities in the format 65536:nnn, as my AS number is 4-bytes (6 digits). IANA specifies which registries are assigned which AS numbers (see https://www.iana.org/assignments/as-num ... bers.xhtml) , and there is no allowance for scenarios like this.

Re: BUG - 4-byte ASN and BGP Communities on Route Filters

Posted: Thu Mar 07, 2019 5:30 pm
by mrz
RFC states community attribute length
https://tools.ietf.org/html/rfc1997

Upstream peer cannot use Community attribute for what you described. Either they are using large community attribute or different method.