delete communities

Hi,

Am I missing something?

if (afi ipv4 && protocol bgp && bgp-communities equals TRANS-ANNOUNCE) {
delete bgp-communities TRANS-ANNOUNCE;
accept;
}

The filter matches communities TRANS-ANNOUNCE, but it does not delete TRANS-ANNOUNCE prior to sending the advertisement on to the provider. This is used as a outbound filter on a BGP peer.

delete bgp-communities other; Works, but it then removes all communities, and not only the communities in the TRANS-ANNOUNCE community-list

And yes, given the equals statement as well as manual confirmation - TRANS-ANNOUNCE includes 1 community in the list, and it is a complete, and full match.

Hello,

deleting and filtering on BGP communities is currently broken…
“delete bgp-communities …” and “filter bgp-communities …” are currently inverted when a community list used or the community is specified inline.
On the other hand, if a regex is used, the community is always deleted regardless if delete or filter.
I reported it to support in March (SUP-110901) but never got any response.
The problem still exists on the current release and I was surprised that no one else has noticed it.

Also no response on my support ticket. Seems that is the norm these days.

TY for confirming.

Hi guys,

created another one: #[SUP-128046]: routing-filter-rule delete bgp-communities not working as expected (v7.11.2)

How do you work around this?
And bonus question: How can I delete a community in ROS6? :wink:


Thanks and hopefully they will look into our tickets soon…

Ticket updates from Mikrotik:

September 18th:

Thank you for the report, we will swap filter and delete behavior in one of the next versions.

September 21st:

This is an automated message. Our bug tracker reports, that your issue has been fixed. This means that in the upcoming days, we plan to release a RouterOS update with this fix.

I’d say it’s looking good and I’m looking forward…

BUT I’m still looking for an equivalent for ROS 6 - IS there any chance I can delete a community via route filter on ROS6?!?

Thanks!

In v6
add chain=xx set-bgp-communities=“”

Hi @mrz,

Thanks for responding, but that doesn’t remove a community per se, so I would have to “know” the complete list of communities that need to stay in the community string except for the one I need to remove.
Or am I reading you wrong?

If you want to remove only specific community then it is not possible in v6.

Understood…
That’s what I was afraid of…

Thanks! Will think of something…

It’s fixed:



/routing filter rule
add chain=bgp-backbone rule="append bgp-communities 65001:11111"
add chain=bgp-backbone rule="append bgp-communities 65001:22222"
add chain=bgp-backbone rule="append bgp-communities 65001:12345"
add chain=bgp-backbone rule="append bgp-communities 65001:54321"
add chain=bgp-backbone disabled=no rule="delete bgp-communities 65001:54321"
add chain=bgp-backbone disabled=no rule="if ( afi ipv4 && dst in 10.0.0.0/8 && dst-len <30 ) { accept }"

> /routing/bgp/advertisements/print detail
 0 peer=peer-130 dst=10.x.y.0/24 afi=ip local-pref=100 nexthop=10.i.j.4 origin=0
   communities=65001:22222,65001:12345,65001:11111

:smiley: :smiley: :smiley:

seems fixed! Looking forward to the stable release, to get it fixed in prod as well.

Could it be, that this issue is back in 7.19.6?

Looks like once again a “delete bgp-communities 65001:999” results in deleting all BUT this community.

I disovered this in our production network right now, will setup a small test for this, but I wondered, whether somebody else here uses delete bgp-communities with 7.19.6 successfully?

Will report back after further tests… with more debug.

[update]

okay, so doing it the currently documented way

with a community-list works fine.

Not sure how the regexp version would look like, but maybe the list version is the cleaner one. Will think this through and implement net wide.