Re: Regular Expression

From: Narbik Kocharians (narbikk@gmail.com)
Date: Thu Nov 29 2007 - 19:20:12 ART


By the way the _ does not match everything, think of being in a
confederation and what if you wanted to match on all the routes from
your neighbor in 65501 advertised to you, you would need to do the
following:
^\(65501_
Note the \ remove special meaning of character, remember in a confederation
the as-path shows up in parenthises.

As far as prepending, there are two scenarios, if you wanted to allow or
deny your existing and *future* directly connected neighbors to prepend,
then you need to do the following:
^([0-9]+)(_\1)*$

But if you wanted to allow/deny your existing neighbor in AS 200 to perform
prepending, then you would need to do the following:
^200(_200)*$

On 11/29/07, Usankin, Andrew <Andrew.Usankin@twtelecom.com> wrote:
>
> Dunno how to put it right, but you missing the point here. Nobody thinks
> about confederation routes neither about aggregates with as-set applied.
> For example aggregate route may look like:
>
> Network Next Hop Metric LocPrf Weight Path
> *> 172.16.0.0/22 192.168.1.1 0 0 1 {65530,2}
> i
>
> And "}" is actually a character and takes place in expression.
> Confederates have "(" and ")". So what I'm saying is that "_" sign is in
> fact matches all those characters. Here is a quote from "BGP4 handbook":
>
> _ (underscore) Matches a comma (,), left brace ({), right brace (}),
> left parenthesis ((), right parenthesis ()), the beginning of the
> string, the end of the string, or a space.
> (Pay attention here to "beginning of the string and the end of the
> string")
>
> So if you say "_200$" it will actual match as those routes originated in
> AS 200 as well as those passing through this AS. I like to always make
> it as more specific as it possible, so if I want to filter "routes
> originated in AS 200" I make expression as "^200$" not "_200$".
>
> Andrew
>
> -----Original Message-----
> From: nobody@groupstudy.com [mailto:nobody@groupstudy.com] On Behalf Of
> Tandou Mohamed
> Sent: Wednesday, November 28, 2007 8:01 AM
> To: Gupta, Gopal (NWCC); smorris@ipexpert.com; ccielab@groupstudy.com
> Subject: RE: Regular Expression
>
> Thanks a lot everyone to clear this out for me.
>
> "Gupta, Gopal (NWCC)" <gopal.gupta@hp.com> wrote:
> Hi Tandou,
>
> B means Routes originated in 200,
> just think it logically and go behind the syntax, go behind the original
> string and then apply the syntax logically.
>
> We have As-path like this (100 300 200) (Original string)
>
> B (_200$) now look at the string we want to match out of the original
> string what original string says is the route has traversed 100 300 and
> has originated in 200 coz 200 is the first AS in the original string.
> Now "_" means any AS number in the start of the string and $ means the
> end of the string.
> In case of B we have $ but with 200 and in the start we have mentioned
> any AS number using "_"
>
> Hope I have tried to make you understand........
>
> HTH
> Gops
>
> -----Original Message-----
> From: nobody@groupstudy.com [mailto:nobody@groupstudy.com] On Behalf Of
> Tandou Mohamed
> Sent: Wednesday, November 28, 2007 19:41
> To: smorris@ipexpert.com; ccielab@groupstudy.com
> Subject: RE: Regular Expression
> Importance: Low
>
> Now i understand D. what about B? the origin of the routes will be AS
> 200 only or can be any adjacent neighbor to AS 200 ?
>
> Thanks,
>
> Mohamed
>
> Scott Morris wrote:
> D would be routes LEARNED FROM AS 690 (your peer)
>
> HTH,
>
>
> Scott Morris, CCIE4 (R&S/ISP-Dial/Security/Service Provider) #4713,
> JNCIE-M #153, JNCIS-ER, CISSP, et al.
> CCSI/JNCI-M/JNCI-ER
> VP - Technical Training - IPexpert, Inc.
> IPexpert Sr. Technical Instructor
>
> A Cisco Learning Partner - We Accept Learning Credits!
>
> smorris@ipexpert.com
>
>
>
> Telephone: +1.810.326.1444
> Fax: +1.810.454.0130
> http://www.ipexpert.com
>
>
>
>
>
> -----Original Message-----
> From: nobody@groupstudy.com [mailto:nobody@groupstudy.com] On Behalf Of
> Tandou Mohamed
> Sent: Wednesday, November 28, 2007 8:34 AM
> To: ccielab@groupstudy.com
> Subject: Regular Expression
>
> Hello GS,
> can someone check this out if i am correct about these definition also
> any comment on B,C,D and E those really confuse me sometimes.
>
> Thanks,
>
> Mohamed
>
> A) ip as-path access-list 1 permit _109_ => routes containing or
> transiting AS 109
> B) ip as-path access-list 2 permit _200$ => routes originated in AS 200
> C) ip as-path access-list 2 permit ^100$ => routes originated by a
> neighbor in AS 100
> D) ip as-path access-list 3 permit ^690_ => routes originating from AS
> 690
> E) ip as-path access-list 3 permit ^$ => routes originating from this AS
> (my AS)
>
>
>
> ---------------------------------
> Be a better pen pal. Text or chat with friends inside Yahoo! Mail. See
> how.
>
> _______________________________________________________________________
> Subscription information may be found at:
> http://www.groupstudy.com/list/CCIELab.html
>
>
>
>
> ---------------------------------
> Get easy, one-click access to your favorites. Make Yahoo! your homepage.
>
> _______________________________________________________________________
> Subscription information may be found at:
> http://www.groupstudy.com/list/CCIELab.html
>
>
>
> ---------------------------------
> Be a better pen pal. Text or chat with friends inside Yahoo! Mail. See
> how.
>
> _______________________________________________________________________
> Subscription information may be found at:
> http://www.groupstudy.com/list/CCIELab.html
>
> The content contained in this electronic message is not intended to
> constitute formation of a contract binding TWTC. TWTC will be
> contractually bound only upon execution, by an authorized officer, of
> a contract including agreed terms and conditions or by express
> application of its tariffs.
>
> This message is intended only for the use of the individual or entity
> to which it is addressed. If the reader of this message is not the
> intended recipient, or the employee or agent responsible for
> delivering the message to the intended recipient, you are hereby
> notified that any dissemination, distribution or copying of this
> message is strictly prohibited. If you have received this
> communication in error, please notify us immediately by replying to
> the sender of this E-Mail or by telephone.
>
> _______________________________________________________________________
> Subscription information may be found at:
> http://www.groupstudy.com/list/CCIELab.html
>

-- 
Narbik Kocharians
CCIE# 12410 (R&S, SP, Security)
CCSI# 30832
www.Net-WorkBooks.com


This archive was generated by hypermail 2.1.4 : Sat Dec 01 2007 - 06:37:32 ART