[j-nsp] AS-path

Judah Scott judah.scott.iam at gmail.com
Thu Aug 13 13:17:57 EDT 2009


I think the most important note on regexp in as-path is that the basic
matching unit is the AS number and not individual characters.  For AS-Path,
the guide notes the ! as not operator and no mention of the [^] which is the
negated character set, or "except" operator, as Paul mentioned.

However, according to the guide the community strings are matched on a
per-character basis and they do note the [] and use of [^] operators.  The
whole thing is a little confusing given the two regexp engines.  Below are
the links where I found this info.


AS-Path:
http://www.juniper.net/techpubs/en_US/junos9.5/information-products/topic-collections/config-guide-policy/policy-configuring-as-path-regular-expressions-to-use-as-routing-policy-match-conditions.html#id-10278439

Community Strings:
http://www.juniper.net/techpubs/en_US/junos9.5/information-products/topic-collections/config-guide-policy/policy-defining-bgp-communities-and-extended-communities-for-use-in-routing-policy-match-conditions.html#id-10247318


Thanks,
J Scott


On Thu, Aug 13, 2009 at 5:25 AM, Paul Goyette <pgoyette at juniper.net> wrote:

> IIRC, the standard RegExp "except" operator IS supported:
>
> > set as-path 100not1000orig ".* 100 .* (!1000)$"
>
> set as-path 100not1000orig ".* 100 .* [^1000]$"
>


More information about the juniper-nsp mailing list