pierky / arouteserver

A tool to automatically build (and test) feature-rich configurations for BGP route servers.
https://arouteserver.readthedocs.org/
GNU General Public License v3.0
284 stars 46 forks source link

4Byte to 2Byte ASN conversion issue for BGP community #101

Closed nitesh058 closed 1 year ago

nitesh058 commented 2 years ago

Please help for "4Byte to 2Byte ASN conversion issue for BGP community" or share any configuration example.

pierky commented 2 years ago

Mind elaborating a bit? With no extra context I’d say the solution is http://largebgpcommunities.net/

Examples and docs can be found on this GitHub repository or at https://arouteserver.readthedocs.io/en/latest/

nitesh058 commented 1 year ago

Hi Pierky, Please help for N:M filtering based on standard community strings. As standard BGP communities support only 4 bytes, How we map peer asn with 2-byte private ASN as per below-mentioned table in arouteserver, so that we can provide a 2-byte private ASN to our other Peers to apply community accordingly.

Peer 32-bit ASN BGP Community
Peer1 133469 65000
Peer2 132570 65001
Peer3 133168 65002

Please give the solution and thanks in advance..

lukastribus commented 1 year ago

MINAP offers such a mapping with IXP Manager:

https://manager.minap.it/public-content/rs

Mapping 32 bit ASNs

Peers with 32 bit ASNs can be filtered either by using large BGP communities, or by using standard communities and mapping the 32 bit peers ASN to a 16 bit ASN. E.g. routes to AS 201333 can be blocked by tagging them with the 43369:0:201333 large community or the 0:65040 standard community.

pierky commented 1 year ago

Hello @nitesh058,

thanks for elaborating more on your original comment. At the moment ARouteServer does not offer a 32-to-16 bit ASNs map, so filters and other functionalities which are usually offered via std BGP communities are not available for 32bit ASNs. Extended communities and large communities can be used at the moment.

I'll take this as a feature request. I'll update this ticket with any potential plan to implement them.

Thanks again

pierky commented 1 year ago

Hi @nitesh058,

I've just pushed an updated dev branch that contains the new feature.

With the new branch, an alpha release (v1.20.0-alpha1) will come out soon (in about 1 hour, assuming CI/CD will work as expected) and will be available to be installed following the instructions at https://arouteserver.readthedocs.io/en/latest/INSTALLATION.html#development-and-pre-release-versions.

Details about the new release can be already found in the preliminary "dev" version of the docs, at this URL: https://arouteserver.readthedocs.io/en/dev/CONFIG.html#mapping-of-32bit-asns-to-16bit-asns

Later (or max tomorrow) I'll check if everything went well with the release process for this alpha version.

Please let me know your thoughts and share you're feedback if you'll be able to test it.

Thanks

pierky commented 1 year ago

1.20.0a1 is out on the test instance of PyPi: https://test.pypi.org/project/arouteserver/1.20.0a1/

pierky commented 1 year ago

Hi @nitesh058, did you get a chance to look at the solution I've proposed above? Any feedback?

pierky commented 1 year ago

Feature released, no feedback from requestor. Closing this. Feel free to re-open if needed.

nitesh058 commented 1 year ago

Hi @nitesh058, did you get a chance to look at the solution I've proposed above? Any feedback?

Sorry to reply on this late, Its working as expected.