I'd like to create a BGP community that matches 3 different members:
Using the "." I'm able to successfully match 1777 and 2777, but the 777 is disregarded. Expected.
Adding a 2nd member to the same community list breaks the community-list , i.e.
community match-test members asn:.777 asn:777 or a
community match-test members "asn:[1-2]777" asn:777
Any ideas what the magic regular expression is?
Try the following:
Perfect! Thank you
I need to match 2 communities on the same prefix in an import BGP policy to forward determinate traffic type. How can I proceed it? Just creating 2 terms (one for each community), because policy performs "OR" operation inside term, correct? I could use a "next-policy" statement too... There are any other "more useful" proceed to do it? Thanks.
For example, if prefixe has both communities 65000:10 and 65000:20, then it matches the policy. If prefixe have only community 65000:10 or other, so it no match this policy.
You are correct, because the community attribute in a term is a logical or, you will need to have two terms to successfully check for routes with both community set.
I would do this as the final check in the policy
The first term will check for 65000:10 and if present proceed to the next term.
If not present proceed to the the final policy in your chain or end
The second term checks for 65000:20 and if present does the desired action
If not proceed to the final policy in the chain or end