[j-nsp] as-path filtering
Sergio D.
sdanelli at gmail.com
Thu Jun 25 14:56:51 EDT 2009
"I didn't notice this before, but you probably don't mean that. The
regex above also matches AS paths like "1000 2000 71234 3000" and "1000
2000 12345678 3000"
You want:
set policy-options as-path a ".* 1234$"
set policy-options as-path b ".* 5678$""
No it doesn't match AS paths like that, because in Junos compared to IOS,
matches are done on the entire AS number, so "." represents an entire AS
number like 1000, not one character in the AS.
The basic unit of matching in an AS path regular expression is the AS number
and not an individual character.
From
http://www.juniper.net/techpubs/software/junos/junos90/swconfig-policy/how-as-path-regular-expressions-are-evaluated.html
Message: 4
Date: Thu, 25 Jun 2009 11:29:55 -0400
From: Ross Vandegrift <ross at kallisti.us>
To: Samit <janasamit at wlink.com.np>
Cc: juniper-nsp <juniper-nsp at puck.nether.net>
Subject: Re: [j-nsp] as-path filtering
Message-ID: <20090625152955.GA1693 at kallisti.us>
Content-Type: text/plain; charset=us-ascii
On Thu, Jun 25, 2009 at 11:17:58AM +0545, Samit wrote:
> Works..!
>
> Thanks for you help.
>
> Samit
>
>
> Nalkhande Tarique Abbas wrote:
> > Try this..
> >
> >
> > set policy-options as-path a ".*1234"
> > set policy-options as-path b ".*5678"
I didn't notice this before, but you probably don't mean that. The
regex above also matches AS paths like "1000 2000 71234 3000" and "1000
2000 12345678 3000"
You want:
set policy-options as-path a ".* 1234$"
set policy-options as-path b ".* 5678$"
Ross
--
Ross Vandegrift
ross at kallisti.us
"If the fight gets hot, the songs get hotter. If the going gets tough,
the songs get tougher."
--Woody Guthrie
--
Sergio Danelli
JNCIE #170
More information about the juniper-nsp
mailing list