Re: [j-nsp] apply-path regex for specific interface matching

2014-04-07 Thread Ben Dale

On 7 Apr 2014, at 6:37 pm, Dave Bell 
mailto:m...@geordish.org>> wrote:

I'm not sure you can do exactly what you are interested in. I would use two 
prefix lists as follows.

policy-options {
prefix-list list1 {
apply-path "interfaces  unit <*> family inet address <*>";
}
prefix-list list2 {
apply-path "interfaces  unit <*> family inet address 
<*>";
}
}


Thanks Dave and Tim - looks like multiple lists will have to do.





On 7 April 2014 02:45, Ben Dale 
mailto:bd...@comlinx.com.au>> wrote:
Dredging up an old thread here, but I have a requirement for an apply-path that 
matches ae* and ge-1/[01]/[0-4] unit * (for a prefix-list).

I must be missing something fundamental about the regex you can use in 
apply-path though, because all combinations I've tried seem to fail.

About as close as I can get to something that actually gives me results is 
"interfaces <[ae|ge-1/0/]*> unit <*> family net address <*>" which isn't all 
that useful.

It doesn't look like apply-path supports any nesting of regexes either eg: 
interfaces <[ae|ge-1/[01]/]*> returns no results at all

Any thoughts?

On 26 Feb 2014, at 1:48 pm, Michael Gehrmann 
mailto:mgehrm...@macquarietelecom.com>> wrote:

> Hi Ben,
>
> I believe this document on the juniper site is what you were looking for.
>
> http://www.juniper.net/techpubs/en_US/junos12.1/topics/concept/junos-cli-wildcard-characters-configuration-groups-usage.html
>
> Cheers
> Mike
>
> -Original Message-
> From: juniper-nsp 
> [mailto:juniper-nsp-boun...@puck.nether.net<mailto:juniper-nsp-boun...@puck.nether.net>]
>  On Behalf Of Ben Dale
> Sent: Wednesday, 26 February 2014 9:43 AM
> To: juniper-nsp@puck.nether.net<mailto:juniper-nsp@puck.nether.net>
> Subject: [j-nsp] apply-path regex for specific interface matching
>
> Hi all,
>
> I'm trying to generate a prefix-list for all CE-facing interfaces on a PE 
> (assume L3VPN).
>
> As a test, I'm just trying to match all ge interfaces, but the following 
> returns no match at all:
>
> prefix-list CE-LINKS {
>apply-path "interfaces ge-<*> unit <*> family inet address <*>"; }
>
> I've tried both ge<*>, ge-<*> but no luck either way, and as soon as I remove 
> "ge-", I get all interface prefixes as expected.
>
> I vaguely remember a post here on this a while back, but I haven't been able 
> to track it down and google/Juniper docs are not providing any info.
>
> Is anyone aware of 1) a solution, or 2) any docs that go through what regex 
> is actually available in apply-path?
>
> Thanks,
>
> Ben
>
> ___
> juniper-nsp mailing list 
> juniper-nsp@puck.nether.net<mailto:juniper-nsp@puck.nether.net> 
> https://puck.nether.net/mailman/listinfo/juniper-nsp


___
juniper-nsp mailing list 
juniper-nsp@puck.nether.net<mailto:juniper-nsp@puck.nether.net>
https://puck.nether.net/mailman/listinfo/juniper-nsp


___
juniper-nsp mailing list juniper-nsp@puck.nether.net
https://puck.nether.net/mailman/listinfo/juniper-nsp


Re: [j-nsp] apply-path regex for specific interface matching

2014-04-07 Thread Dave Bell
I'm not sure you can do exactly what you are interested in. I would use two
prefix lists as follows.

policy-options {
prefix-list list1 {
apply-path "interfaces  unit <*> family inet address <*>";
}
prefix-list list2 {
apply-path "interfaces  unit <*> family inet
address <*>";
}
}



On 7 April 2014 02:45, Ben Dale  wrote:

> Dredging up an old thread here, but I have a requirement for an apply-path
> that matches ae* and ge-1/[01]/[0-4] unit * (for a prefix-list).
>
> I must be missing something fundamental about the regex you can use in
> apply-path though, because all combinations I've tried seem to fail.
>
> About as close as I can get to something that actually gives me results is
> "interfaces <[ae|ge-1/0/]*> unit <*> family net address <*>" which isn't
> all that useful.
>
> It doesn't look like apply-path supports any nesting of regexes either eg:
> interfaces <[ae|ge-1/[01]/]*> returns no results at all
>
> Any thoughts?
>
> On 26 Feb 2014, at 1:48 pm, Michael Gehrmann <
> mgehrm...@macquarietelecom.com> wrote:
>
> > Hi Ben,
> >
> > I believe this document on the juniper site is what you were looking for.
> >
> >
> http://www.juniper.net/techpubs/en_US/junos12.1/topics/concept/junos-cli-wildcard-characters-configuration-groups-usage.html
> >
> > Cheers
> > Mike
> >
> > -Original Message-
> > From: juniper-nsp [mailto:juniper-nsp-boun...@puck.nether.net] On
> Behalf Of Ben Dale
> > Sent: Wednesday, 26 February 2014 9:43 AM
> > To: juniper-nsp@puck.nether.net
> > Subject: [j-nsp] apply-path regex for specific interface matching
> >
> > Hi all,
> >
> > I'm trying to generate a prefix-list for all CE-facing interfaces on a
> PE (assume L3VPN).
> >
> > As a test, I'm just trying to match all ge interfaces, but the following
> returns no match at all:
> >
> > prefix-list CE-LINKS {
> >apply-path "interfaces ge-<*> unit <*> family inet address <*>"; }
> >
> > I've tried both ge<*>, ge-<*> but no luck either way, and as soon as I
> remove "ge-", I get all interface prefixes as expected.
> >
> > I vaguely remember a post here on this a while back, but I haven't been
> able to track it down and google/Juniper docs are not providing any info.
> >
> > Is anyone aware of 1) a solution, or 2) any docs that go through what
> regex is actually available in apply-path?
> >
> > Thanks,
> >
> > Ben
> >
> > ___
> > juniper-nsp mailing list juniper-nsp@puck.nether.net
> https://puck.nether.net/mailman/listinfo/juniper-nsp
>
>
> ___
> juniper-nsp mailing list juniper-nsp@puck.nether.net
> https://puck.nether.net/mailman/listinfo/juniper-nsp
>
___
juniper-nsp mailing list juniper-nsp@puck.nether.net
https://puck.nether.net/mailman/listinfo/juniper-nsp


Re: [j-nsp] apply-path regex for specific interface matching

2014-04-06 Thread Chris Adams
Once upon a time, Ben Dale  said:
> Dredging up an old thread here, but I have a requirement for an apply-path 
> that matches ae* and ge-1/[01]/[0-4] unit * (for a prefix-list).
> 
> I must be missing something fundamental about the regex you can use in 
> apply-path though, because all combinations I've tried seem to fail.

I believe apply-path is a glob, not a regex.  A glob is more like a
shell wildcard, where "*" matches anything (a regex "*" means "zero or
more of the previous part of the match").  I think you'll have to do
multiple separate matches and then have multiple entries in your
prefix-list.

-- 
Chris Adams 
___
juniper-nsp mailing list juniper-nsp@puck.nether.net
https://puck.nether.net/mailman/listinfo/juniper-nsp


Re: [j-nsp] apply-path regex for specific interface matching

2014-04-06 Thread Ben Dale
Dredging up an old thread here, but I have a requirement for an apply-path that 
matches ae* and ge-1/[01]/[0-4] unit * (for a prefix-list).

I must be missing something fundamental about the regex you can use in 
apply-path though, because all combinations I've tried seem to fail.

About as close as I can get to something that actually gives me results is 
"interfaces <[ae|ge-1/0/]*> unit <*> family net address <*>" which isn't all 
that useful.

It doesn't look like apply-path supports any nesting of regexes either eg: 
interfaces <[ae|ge-1/[01]/]*> returns no results at all

Any thoughts?

On 26 Feb 2014, at 1:48 pm, Michael Gehrmann  
wrote:

> Hi Ben,
> 
> I believe this document on the juniper site is what you were looking for.
> 
> http://www.juniper.net/techpubs/en_US/junos12.1/topics/concept/junos-cli-wildcard-characters-configuration-groups-usage.html
> 
> Cheers
> Mike
> 
> -Original Message-
> From: juniper-nsp [mailto:juniper-nsp-boun...@puck.nether.net] On Behalf Of 
> Ben Dale
> Sent: Wednesday, 26 February 2014 9:43 AM
> To: juniper-nsp@puck.nether.net
> Subject: [j-nsp] apply-path regex for specific interface matching
> 
> Hi all,
> 
> I'm trying to generate a prefix-list for all CE-facing interfaces on a PE 
> (assume L3VPN).
> 
> As a test, I'm just trying to match all ge interfaces, but the following 
> returns no match at all:
> 
> prefix-list CE-LINKS {
>apply-path "interfaces ge-<*> unit <*> family inet address <*>"; }
> 
> I've tried both ge<*>, ge-<*> but no luck either way, and as soon as I remove 
> "ge-", I get all interface prefixes as expected.
> 
> I vaguely remember a post here on this a while back, but I haven't been able 
> to track it down and google/Juniper docs are not providing any info.
> 
> Is anyone aware of 1) a solution, or 2) any docs that go through what regex 
> is actually available in apply-path?
> 
> Thanks,
> 
> Ben
> 
> ___
> juniper-nsp mailing list juniper-nsp@puck.nether.net 
> https://puck.nether.net/mailman/listinfo/juniper-nsp


___
juniper-nsp mailing list juniper-nsp@puck.nether.net
https://puck.nether.net/mailman/listinfo/juniper-nsp


Re: [j-nsp] apply-path regex for specific interface matching

2014-02-25 Thread Michael Gehrmann
Hi Ben,

I believe this document on the juniper site is what you were looking for.

http://www.juniper.net/techpubs/en_US/junos12.1/topics/concept/junos-cli-wildcard-characters-configuration-groups-usage.html

Cheers
Mike

-Original Message-
From: juniper-nsp [mailto:juniper-nsp-boun...@puck.nether.net] On Behalf Of Ben 
Dale
Sent: Wednesday, 26 February 2014 9:43 AM
To: juniper-nsp@puck.nether.net
Subject: [j-nsp] apply-path regex for specific interface matching

Hi all,

I'm trying to generate a prefix-list for all CE-facing interfaces on a PE 
(assume L3VPN).

As a test, I'm just trying to match all ge interfaces, but the following 
returns no match at all:

prefix-list CE-LINKS {
apply-path "interfaces ge-<*> unit <*> family inet address <*>"; }

I've tried both ge<*>, ge-<*> but no luck either way, and as soon as I remove 
"ge-", I get all interface prefixes as expected.

I vaguely remember a post here on this a while back, but I haven't been able to 
track it down and google/Juniper docs are not providing any info.

Is anyone aware of 1) a solution, or 2) any docs that go through what regex is 
actually available in apply-path?

Thanks,

Ben

___
juniper-nsp mailing list juniper-nsp@puck.nether.net 
https://puck.nether.net/mailman/listinfo/juniper-nsp

___
juniper-nsp mailing list juniper-nsp@puck.nether.net
https://puck.nether.net/mailman/listinfo/juniper-nsp


Re: [j-nsp] apply-path regex for specific interface matching

2014-02-25 Thread Jason Munns
I think the ge- part needs to be inside the <>, so try 

Jason


On 26 February 2014 09:42, Ben Dale  wrote:

> Hi all,
>
> I'm trying to generate a prefix-list for all CE-facing interfaces on a PE
> (assume L3VPN).
>
> As a test, I'm just trying to match all ge interfaces, but the following
> returns no match at all:
>
> prefix-list CE-LINKS {
> apply-path "interfaces ge-<*> unit <*> family inet address <*>";
> }
>
> I've tried both ge<*>, ge-<*> but no luck either way, and as soon as I
> remove "ge-", I get all interface prefixes as expected.
>
> I vaguely remember a post here on this a while back, but I haven't been
> able to track it down and google/Juniper docs are not providing any info.
>
> Is anyone aware of 1) a solution, or 2) any docs that go through what
> regex is actually available in apply-path?
>
> Thanks,
>
> Ben
>
> ___
> juniper-nsp mailing list juniper-nsp@puck.nether.net
> https://puck.nether.net/mailman/listinfo/juniper-nsp
>
___
juniper-nsp mailing list juniper-nsp@puck.nether.net
https://puck.nether.net/mailman/listinfo/juniper-nsp


Re: [j-nsp] apply-path regex for specific interface matching

2014-02-25 Thread Dave Bell
Try .

Dave
On 25 Feb 2014 22:45, "Ben Dale"  wrote:

> Hi all,
>
> I'm trying to generate a prefix-list for all CE-facing interfaces on a PE
> (assume L3VPN).
>
> As a test, I'm just trying to match all ge interfaces, but the following
> returns no match at all:
>
> prefix-list CE-LINKS {
> apply-path "interfaces ge-<*> unit <*> family inet address <*>";
> }
>
> I've tried both ge<*>, ge-<*> but no luck either way, and as soon as I
> remove "ge-", I get all interface prefixes as expected.
>
> I vaguely remember a post here on this a while back, but I haven't been
> able to track it down and google/Juniper docs are not providing any info.
>
> Is anyone aware of 1) a solution, or 2) any docs that go through what
> regex is actually available in apply-path?
>
> Thanks,
>
> Ben
>
> ___
> juniper-nsp mailing list juniper-nsp@puck.nether.net
> https://puck.nether.net/mailman/listinfo/juniper-nsp
>
___
juniper-nsp mailing list juniper-nsp@puck.nether.net
https://puck.nether.net/mailman/listinfo/juniper-nsp


[j-nsp] apply-path regex for specific interface matching

2014-02-25 Thread Ben Dale
Hi all,

I'm trying to generate a prefix-list for all CE-facing interfaces on a PE 
(assume L3VPN).

As a test, I'm just trying to match all ge interfaces, but the following 
returns no match at all:

prefix-list CE-LINKS {
apply-path "interfaces ge-<*> unit <*> family inet address <*>";
}

I've tried both ge<*>, ge-<*> but no luck either way, and as soon as I remove 
"ge-", I get all interface prefixes as expected.

I vaguely remember a post here on this a while back, but I haven't been able to 
track it down and google/Juniper docs are not providing any info.

Is anyone aware of 1) a solution, or 2) any docs that go through what regex is 
actually available in apply-path?

Thanks,

Ben

___
juniper-nsp mailing list juniper-nsp@puck.nether.net
https://puck.nether.net/mailman/listinfo/juniper-nsp