Hi All, I have a question regarding using named communities in square brackets: If I have a policy like the one below:
[edit policy-options]
+ community BREAD members 3000:100;
+ community BUTTER members 3000:200;
[edit policy-options policy-statement TEST]
+ term match-community {
+ from {
+ protocol bgp;
+ community [ BREAD BUTTER ];
+ }
+ then accept;
+ }
+ term reject {
+ then reject;
+ }
Would it mean that a route would have to have BOTH the BREAD and BUTTER communities to be accepted by this policy, or would it behave the same as the policy below where a route would only need to have either the BREAD community or the BUTTER community in order to be accepted by the policy:
[edit policy-options]
+ community BREAD members 3000:100;
+ community BUTTER members 3000:200;
[edit policy-options policy-statement TEST]
+ term match-community {
+ from {
+ protocol bgp;
+ community BREAD;
+ community BUTTER;
+ }
+ then accept;
+ }
+ term reject {
+ then reject;
+ }
i.e. does putting NAMED communities together in square brackets make a logical AND or a logical OR?
N.B: I'm aware that I could create a community called BREADBUTTER like the below:
[edit policy-options]
+ community BREADBUTTER members [ 3000:100 3000:200 ]
then make a policy like the below which would mean that any route would have to have BOTH communities in order to be accepted by the policy:
[edit policy-options policy-statement TEST]
+ term match-community {
+ from {
+ protocol bgp;
+ community BREADBUTTER;
+ }
+ then accept;
+ }
+ term reject {
+ then reject;
+ }
TIA