Re: BGP regexp - AS count

From: Radoslav Vasilev (deckland@gmail.com)
Date: Wed Aug 09 2006 - 13:22:05 ART


Sure,

I know the location of the regexp reference in the DocCD:

Conf. Guides / Terminal Services / Appendixes (supprised already :) ? )

http://www.cisco.com/univercd/cc/td/doc/product/software/ios122/122cgcr/ftersv_c/ftsappx/tcfaapre.htm

Basically what we're doing is matchin a single AS (any one) by using the
([1-9]+) and then reference the very same, already matched, AS number with
\1

If you use secondary () , you can reference them with a \2 and so on..

Rado

On 8/9/06, Michal.Grzybczyk@vattenfall.pl <Michal.Grzybczyk@vattenfall.pl>
wrote:
>
>
> Hi Radoslav,
>
> Good job.
>
> It really works!
>
> I have been fighting with it for 2hours :)
>
> I didn't know about (\1) and (\2) in regexp command.
> Could you send any link from do you got to know about it ?
> Thanks.
>
>
> Who knows how use '?' in command line ??
>
>
> Regards,
> Grzybek
>
>
>
>
>
> -------------------------------------------
> sh ip bgp regexp ^500(_[1-9]+)(\1)*$
>
> sh ip bgp regexp ^500(_[1-9]+)(\1)*(_[1-9]+)(\2)*$
>
> you got the idea, again it all depends on the wording, especially whether
> we should use + or * for the first AS after AS500.
>
>
>
> Rado
>
>
>
> On 8/9/06, Chee Chew Leong <cleong3@csc.com> wrote:
> >
> > Hi Michal,
> >
> > The example shown are just a few of it. In actual, there are thousands
> > of them and not possible to specify by the actual AS. We need to use
> > something less specific.
> >
> > What I want should be,
> > for example 2 AS, the AS path that match should be 500 "any AS#
> > with/without prepend"
> > for example 3 AS, the AS path that match should be 500 "any AS#
> > with/without prepend" "any AS# with/without prepend"
> >
> > Is this possible?
> >
> > I hope I could state the requirement clearly.
> >
> > Regards
> >
> >
> >
> > -----nobody@groupstudy.com wrote: -----
> >
> >
> > To: <ccielab@groupstudy.com>
> > From: <Michal.Grzybczyk@vattenfall.pl> Sent by: nobody@groupstudy.com
> > Date: 08/09/2006 06:03PM
> > Subject: RE: BGP regexp - AS count
> >
> > Hello,
> >
> >
> > >For example:-
> >
> > >2 AS away
> > >500 10
> > >500 10 10 10
> >
> > My version:
> >
> > ^(500_)+(10_)+$
> >
> >
> > >3 AS away
> > >500 30 40
> > >500 500 30 30 40
> >
> >
> >
> > ^(500_)+(30_)+(40_)+$
> >
> >
> > Best Regards,
> > grzybek
> >
> > ______________________________________________________________________
> > _ Subscription information may be found at:
> >
> > http://www.groupstudy.com/list/CCIELab.html---------------------------
> > ----------------------------------------------------------------------
> > ----------------------------------------------------------------------
> > ---------
> >
> > This is a PRIVATE message. If you are not the intended recipient,
> > please delete without copying and kindly advise us by e-mail of the
> > mistake in delivery. NOTE: Regardless of content, this e-mail shall
> > not operate to bind CSC to any order or other contract unless pursuant
> > to explicit written agreement or government initiative expressly
> > permitting the use of e-mail for such purpose.
> >
> > ----------------------------------------------------------------------
> > ----------------------------------------------------------------------
> > ------------------------------------
> >
> > ______________________________________________________________________
> > _ Subscription information may be found at:
> > http://www.groupstudy.com/list/CCIELab.html
>
> _______________________________________________________________________
> Subscription information may be found at:
> http://www.groupstudy.com/list/CCIELab.html



This archive was generated by hypermail 2.1.4 : Fri Sep 01 2006 - 15:41:56 ART