input.accept-comunities (string; Default: ) A quick way to filter incoming updates with specific communities. It allows filtering incoming messages directly before they are even parsed and stored in memory, that way significantly reducing memory usage. Regular input filter chain can only reject prefixes which means that it will still eat memory and will be visible in /routing route table as "not active, filtered". Changes to be applied required session refresh.
I use a service that provides a bunch of bgp communities and I want to filter some of them.
E.g. I need 65444:700 and 65444:710
so I add:
Code: Select all
/routing filter community-list
add communities=65444:710,65444:700 disabled=no list=some_list
Code: Select all
/routing bgp connection
add as=*** disabled=no hold-time=4m input.accept-communities=some_list \
.filter=bgp_in keepalive-time=1m listen=yes local.address=*** .role=\
ebgp multihop=yes name=some_bgp output.filter-chain=discard \
remote.address=*** .as=65444 router-id=*** \
routing-table=main
Code: Select all
/routing filter rule
add chain=bgp_in disabled=no rule="set gw some_gw; accept"
But nothing happens, I still receive all the communities.
It works only f I use filtering like below:
Code: Select all
/routing filter rule
add chain=bgp_in disabled=no rule="if ( bgp-communities equal 65444:700 || bg\
p-communities equal 65444:710) {set gw some_gw; accept}"