Re: [j-nsp] Match multiple bgp communities in a policy with AND condition

2017-04-07 Thread Job Snijders
On Fri, Apr 07, 2017 at 11:38:20AM +0300, Saku Ytti wrote: > On 6 April 2017 at 19:17, Michael Still wrote: > > FYI I made a Juniper SE submit an ER to implement this kind of > > functionality (plus some more community stuff). What I asked for > > related to this case was to

Re: [j-nsp] Match multiple bgp communities in a policy with AND condition

2017-04-07 Thread Saku Ytti
On 6 April 2017 at 19:17, Michael Still wrote: Hey, > FYI I made a Juniper SE submit an ER to implement this kind of > functionality (plus some more community stuff). What I asked for > related to this case was to be able to add this `logical-operation > or|and|xor|not` to

Re: [j-nsp] Match multiple bgp communities in a policy with AND condition

2017-04-06 Thread Olivier Benghozi
We use some same kinds of things here, that is subpolicies expressions (or subpolicies chains at other places): policy-statement Blah { term MyTerm { from { policy ( ! (( ! A ) && B && ( C || D ))); } then next policy; } policy-statement A { term

Re: [j-nsp] Match multiple bgp communities in a policy with AND condition

2017-04-06 Thread Michael Still
FYI I made a Juniper SE submit an ER to implement this kind of functionality (plus some more community stuff). What I asked for related to this case was to be able to add this `logical-operation or|and|xor|not` to the end of a policy match community statement. I'll see if I can find the ER info if

Re: [j-nsp] Match multiple bgp communities in a policy with AND condition

2017-04-06 Thread serge vautour
IMHO whether you add a community to a policy term match statement or add a community to a community members list, you still have to add the community somewhere. I don't see how you get from 2x10 to 100 Maybe I don't understand the ask. The only way I know how to get the AND logic to work in a

Re: [j-nsp] Match multiple bgp communities in a policy with AND condition

2017-04-06 Thread Rolf Hanßen
Hello Serge, this works, but that is exactly the config I would like to avoid. In case of 2 communities this adds a third one, but in case of 2x 10 communities that can be combined this adds 100 additional communities. kind regards Rolf > Hello, > > Have you tried this? > > set policy-options

Re: [j-nsp] Match multiple bgp communities in a policy with AND condition

2017-04-06 Thread serge vautour
Hello, Have you tried this? set policy-options community MATCH2 members [ 123:1 123:2 ] I believe this will result in a logical AND. Serge On Thu, Apr 6, 2017 at 8:47 AM, "Rolf Hanßen" wrote: > Hello, > > please show me an example, maybe I understood wrong. > If I just

Re: [j-nsp] Match multiple bgp communities in a policy with AND condition

2017-04-06 Thread Rolf Hanßen
Hello, please show me an example, maybe I understood wrong. If I just create multiple policies and add them to the import/export statement, they are processed indiviually one after another. This would result in the same OR-behaviour. If this match was the whole policy I could combine 2 terms

Re: [j-nsp] Match multiple bgp communities in a policy with AND condition

2017-04-06 Thread Tomasz Mikołajek
Hello. You need to Creat 2 policy and make AND in export import protokół statement. W dniu czw., 6.04.2017 o 13:04 "Rolf Hanßen" napisał(a): > Hello, > > I wanted to match 2 named communities in a policy and I am interested how > you solve such things. > > policy-options { >

[j-nsp] Match multiple bgp communities in a policy with AND condition

2017-04-06 Thread Rolf Hanßen
Hello, I wanted to match 2 named communities in a policy and I am interested how you solve such things. policy-options { policy-statement xy { from { community [a b]; } } community a members 123:1; community