How to delete regular (common) communties and leave extended in the routes?
I need to set regular community. Set means that all other regular communities should be deleted. But extended should be untouched.
The received route is (with regular 100:5 and extended target:31133:5):
* 100:5:55.0.0.1/32 (1 entry, 1 announced) Communities: 100:5 target:31133:5
If use configuration like this:
policy-statement delete_comm { term 20 { from protocol bgp; then { community delete all-standard; community add 200:5; accept; } } } community standart-all members *:*
it will delete all communities regular and extended (target) and add regular 200:5:
100:5:55.0.0.1/32 (1 entry, 1 announced) Communities: 200:5
Workaround configuration:
community all-standard { invert-match; members target:*:*; }
is working:
100:5:55.0.0.1/32 (1 entry, 1 announced) Communities: 200:5 target:31133:5
It deletes all communitites that don't match any extended target. But it's not good as it deletes all other extended communities (origin ro bandwidth) that could be attached to other routes. And even those (in future) that isn't developed yet.
Is there some way to explicitly delete only regular communities?