Mailing List Archive

boolean math for communities
Policy error: !community_a community referenced (in term
not_communitya) but not defined

I've also had problems with commuity_a && comunity_b, is this
functionality not implemented?

Has anyone figured out a way to match a term based on two (or more)
communities all existing, or a community not existing?

Thanks.
--Phil Rosenthal
ISPrime, Inc.
boolean math for communities [ In reply to ]
To require that two specific communities be present, use

policy-options {
community a-and-b members [a b];
}

policy x {
term x1 {
from {
community a-and-b;
}
then ...
}
}

To require that a single community not be present, use

policy-options {
community not-c {
members c;
invert-match;
}
}

-----Original Message-----
From: juniper-nsp-bounces@puck.nether.net
[mailto:juniper-nsp-bounces@puck.nether.net]On Behalf Of Phil Rosenthal
Sent: Monday, December 08, 2003 10:07 PM
To: juniper-nsp@puck.nether.net
Subject: [j-nsp] boolean math for communities


Policy error: !community_a community referenced (in term
not_communitya) but not defined

I've also had problems with commuity_a && comunity_b, is this
functionality not implemented?

Has anyone figured out a way to match a term based on two (or more)
communities all existing, or a community not existing?

Thanks.
--Phil Rosenthal
ISPrime, Inc.

_______________________________________________
juniper-nsp mailing list juniper-nsp@puck.nether.net
http://puck.nether.net/mailman/listinfo/juniper-nsp
boolean math for communities [ In reply to ]
pr@isprime.com (Phil Rosenthal) writes:

> Policy error: !community_a community referenced (in term
> not_communitya) but not defined
>
> I've also had problems with commuity_a && comunity_b, is this
> functionality not implemented?
>
> Has anyone figured out a way to match a term based on two (or more)
> communities all existing, or a community not existing?
>

policy-options {
community not_a {
members x:y;
invert-match; <====
}
community a_and_b members [x:y a:b];
}

roque@pro-olive34# set policy-options community not_a ?
Possible completions:
+ apply-groups Groups from which to inherit configuration data
+ apply-groups-except Don't inherit configuration data from these
groups
invert-match Invert the result of the community expression
matching
+ members Community members

>Number: 27639
>Synopsis: add invert-match statement for community regular expressions
>Committed-In: 5.6R1

Pedro.
boolean math for communities [ In reply to ]
JUNOS policy only supports boolean operators, aka "policy expressions"
as members of policy chains. The operate on policies, not on
communities.

You can do some pretty interesting things with it, both in
import/export statements, and in policy subroutines. Read the docs
carefully though they don't behave exactly as you might guess.

Also, if you can get a hold of the Juniper book (Juniper Networks
Routers: The Complete Reference), if you're interested, my chapter
there on policy goes into significant (some might even say painful)
detail on how expressions & subroutines work & how you can use them.

-Avram

On Dec 9, 2003, at 1:07 AM, Phil Rosenthal wrote:

> Policy error: !community_a community referenced (in term
> not_communitya) but not defined
>
> I've also had problems with commuity_a && comunity_b, is this
> functionality not implemented?
>
> Has anyone figured out a way to match a term based on two (or more)
> communities all existing, or a community not existing?
>
> Thanks.
> --Phil Rosenthal
> ISPrime, Inc.
>
> _______________________________________________
> juniper-nsp mailing list juniper-nsp@puck.nether.net
> http://puck.nether.net/mailman/listinfo/juniper-nsp