RE: BGP Reg Expressions

From: ying chang (ying_c@xxxxxxxxxxx)
Date: Wed Mar 27 2002 - 23:36:23 GMT-3


   
Hi,

ip as-path access-list 1 permit (64118|64239) should be fine as well.

Chang

>From: "Williams, Glenn" <WILLIAMSG@PANASONIC.COM>
>Reply-To: "Williams, Glenn" <WILLIAMSG@PANASONIC.COM>
>To: "'Michael C. Popovich '" <mpopovich@layer3.biz>, "'D. J. Jones
>'" <meganac@attbi.com>, "'Gregg Malcolm '" <greggm@sbcglobal.net>,
> "'ccielab@groupstudy.com '" <ccielab@groupstudy.com>
>Subject: RE: BGP Reg Expressions
>Date: Wed, 27 Mar 2002 18:45:50 -0500
>
>FWIW, if perhaps on the lab they said use one statement to filter only AS
>64118 to 64239 how would you do it? What I have played with that seems to
>work would be something like:
>
>ip as-path access-list 1 permit (64[1-2][1-3]9)
>
>If I don't have this just right, someone let me know.
>GW
>
>
>-----Original Message-----
>From: Michael C. Popovich
>To: D. J. Jones; Gregg Malcolm; ccielab@groupstudy.com
>Sent: 3/27/02 6:30 PM
>Subject: RE: BGP Reg Expressions
>
>I would agree with that statement.
>
>MP
>
>-----Original Message-----
>From: D. J. Jones [mailto:meganac@attbi.com]
>Sent: Wednesday, March 27, 2002 3:53 PM
>To: Gregg Malcolm; ccielab@groupstudy.com
>Subject: Re: BGP Reg Expressions
>
>Let me insert the whole command for completeness:
>
>ip as-path access-list 1 deny _150_
>
>dj
>----- Original Message -----
>From: "Gregg Malcolm" <greggm@sbcglobal.net>
>To: <ccielab@groupstudy.com>
>Sent: Wednesday, March 27, 2002 1:01 PM
>Subject: Fw: BGP Reg Expressions
>
>
> > > Thanks Clay. Think the light is finally getting somewhat brighter
>for
>me.
> > > I set up a bunch of AS prepends on a router then played with
>filtering
>AS
> > > paths.
> > >
> > > From what I can see, there are a few important reg exp's to remember
>: _
>^
> > > and $
> > >
> > > _ matches any instance. Good for filtering transit AS info.
> > > ^ matches the beginning. Used for filtering paths beginning with an
>AS
> > > number
> > > $ matches ends with. Used for filtering paths that end with an AS
>number.
> > > I find I must use _ then path then $ (eg _30$) to filter path that
> > > originated at path 30.
> > >
> > > I think these 3 along with .* and ^$ will hopefully get me thru the
>lab.
> > I
> > > believe that I can do any filtering with multiples of these. Let's
>say
> > that
> > > I was asked to deny all routes that originated in path 50 and all
>routes
> > > that passed thru 150 :
> > > ip as-path access-list 1 deny _50$
> > > ip as-path access-list 1 deny _150 (same as just 150 tho.. I need to
>test
> > > some more)
> > > ip as-path access-list 1 permit .*
> > >
> > > Sound right ? I'm certain that other expressions are very useful but
>I'm
> > not
> > > sure that I can remember them all. Plus, I'm not really sure that
>they
> > will
> > > be needed on the lab test.
> > >
> > > I've also found that sh ip bgp reg <expression> helps a bunch to
>test
>the
> > > expression before placing it in an as-path list. A great feature
>that I
> > > never really used before.
> > >
> > > Gregg
> > >
> > >
> > >
> > > ----- Original Message -----
> > > From: "Clay Maney" <clay@openworldinc.com>
> > > To: "Gregg Malcolm" <greggm@sbcglobal.net>
> > > Sent: Wednesday, March 27, 2002 11:09 AM
> > > Subject: Re: BGP Reg Expressions
> > >
> > >
> > > > I'm not the guru here by any measure, but I can tell you this for
>sure:
> > > >
> > > > the ^ means "beginning with" and the $ means "ending with".
> > > >
> > > > so, ^30 means "where 30 is the first AS in the list", etc.
> > > >
> > > > hope that helps (and please let me know if I'm wrong)
> > > >
> > > > Clay
> > > >
> > > > On Wed, Mar 27, 2002 at 10:44:35AM -0800, Gregg Malcolm wrote:
> > > > > Folks,
> > > > >
> > > > > Does anyone have any good tips to help to remember reg
>expressions ?
> > > > > Unfortunately, my Unix background is pretty weak. I can
>remember
>some
> > > of the
> > > > > simple stuff like .* is all paths, ^$ is local routes (empty),
>_30_
>is
> > > routes
> > > > > that passed thru path 30 , etc.
> > > > >
> > > > > The CD is very limited with info regarding this. Best CD info
>I've
> > > found is
> > > > > an appendix in the dial section :
> > > > >
> > >
> >
>http://127.0.0.1:8080/cc/td/doc/product/software/ios121/121cgcr/dial_r/d
>rdap
> > > p
> > > > > /index.htm
> > > > >
> > > > > Mostly related to chat scripts from what I see. BTW - I swear
>that
>if
> > I
> > > see a
> > > > > chat script on the lab I'll get up and leave immediately.
> > > > >
> > > > > My confusion is not so much with the meaning of the expressions,
>but
> > > with how
> > > > > they are interpreted by BGP. For instance, what's the
>difference
> > > between ^30$
> > > > > and ^30_ ? Is it that ^30$ only matches 30 and nothing else and
>^30_
> > > matches
> > > > > any path with 30 anywhere in it ?
> > > > >
> > > > > Does anyone have a standard set that they use that is somewhat
>easy
>to
> > > > > remember ?
> > > > >
> > > > > TIA, Gregg
> > > > >



This archive was generated by hypermail 2.1.4 : Thu Jun 13 2002 - 10:57:24 GMT-3