Extended Community Set Rule in Policy

A Policy set block can contain several extended community statements. Each set statement is applied to the matching route's extended community attribute in the top down order. That is, the first set is applied to the extended community attribute of the route, the second set is applied to the result of above, and so forth.

For example, assume that a policy is the following:

entry two {
if {
} then {
extended-community set "rt:";
extended-community add "rt: soo:64500:60000";
extended-community delete "rt:64505:10000 soo:";

A BGP route is received with extended community attribute rt:4567:100 soo:

When the above policy entry is applied to the route's extended community attribute, the following is true:
  • After applying the 1st set (community set "rt:"), the route's community becomes rt:
  • After applying the 2nd set (community add "rt: soo:64500:60000"), the community becomes rt: rt: soo:64500:60000.
  • After applying the 3rd set (community delete "rt:64505:10000 soo:"), the community becomes rt: rt: soo:64500:60000. Please note that this delete statement has no effect as none of the communities in the delete statement are present in the community attribute.