From: Brian McGahan (bmcgahan@internetworkexpert.com)
Date: Wed Mar 01 2006 - 15:01:11 GMT-3
You technically could do it in one line if the question stated to do so,
but it would be a little overkill:
ip as-path access-list 1 permit
(^[0-9]+$)|(^[0-9]+_[0-9]+$)|(^[0-9]+_[0-9]+_[0-9]+$)|(^[0-9]+_[0-9]+_[0
-9]+_[0-9]+$)|(^[0-9]+_[0-9]+_[0-9]+_[0-9]+_[0-9]+$)|(^[0-9]+_[0-9]+_[0-
9]+_[0-9]+_[0-9]+_[0-9]+$)|(^[0-9]+_[0-9]+_[0-9]+_[0-9]+_[0-9]+_[0-9]+_[
0-9]+$)|(^[0-9]+_[0-9]+_[0-9]+_[0-9]+_[0-9]+_[0-9]+_[0-9]+_[0-9]+$)|(^[0
-9]+_[0-9]+_[0-9]+_[0-9]+_[0-9]+_[0-9]+_[0-9]+_[0-9]+_[0-9]+$)|(^[0-9]+_
[0-9]+_[0-9]+_[0-9]+_[0-9]+_[0-9]+_[0-9]+_[0-9]+_[0-9]+_[0-9]+$)
:)
Brian McGahan, CCIE #8593
bmcgahan@internetworkexpert.com
Internetwork Expert, Inc.
http://www.InternetworkExpert.com
Toll Free: 877-224-8987 x 705
Outside US: 775-826-4344 x 705
24/7 Support: http://forum.internetworkexpert.com
Live Chat: http://www.internetworkexpert.com/chat/
> -----Original Message-----
> From: nobody@groupstudy.com [mailto:nobody@groupstudy.com] On Behalf
Of
> Chris Lewis
> Sent: Tuesday, February 28, 2006 2:59 PM
> To: Ahmed Shams
> Cc: Dennis Hartmann; R&S CCIE GroupStudy
> Subject: Re: BGP REGULAR EXPRESSION
>
> Yes, I think that is teh more elegant soution than usinf regular
> expressions. However if teh question forbid the use of that command,
you'd
> have to enter multiple lines in an as-path. The following accepts all
> prefixes with less than four AS in them. To extend it to 10, you'd
just
> have
> to extend the number of entries in the following as-path ACL.
>
>
> As-path access-list 1 permit ^[0-9]+$
>
> As-path access-list 1 permit ^[0-9]+_[0-9]+$>
> As-path access-list 1 permit ^[0-9]+_[0-9]+_[0-9]+$
>
> Chris
>
> On 2/28/06, Ahmed Shams <ahmedshamz@gmail.com> wrote:
> >
> > How about this,
> >
> > R1(config-router)#bgp max
> > R1(config-router)#bgp maxas-limit ?
> > <1-2000> Number of ASes in the AS-PATH attribute
> >
> > You can always check the doc for more detailed info on the same : )
> >
> > regds,
> >
> >
> > On 2/26/06, Dennis Hartmann <dhartma5@optonline.net> wrote:
> > >
> > > If a BGP peer wanted to block any AS string of more than
10 AS
> > > hops,
> > > what would be the regular expression?
> > >
> > > 10 or less AS instances, but no more. The AS can not be
> > > identified.
> > > The Regexp must be generic enough to match any AS.
> > >
> > > Thanks.
> > >
> > > Dennis J. Hartmann
> > > CCIE# 15651
> > > White Pine Communications
> > > CCVP/CCSI/CCIP/CCNP/MCSE
> > >
> > >
> > >
> > > -----Original Message-----
> > > From: nobody@groupstudy.com [mailto:nobody@groupstudy.com] On
Behalf
> Of
> > > magmax
> > > Sent: Sunday, February 26, 2006 6:06 AM
> > > To: 'R&S CCIE GroupStudy'
> > > Cc: comserv@groupstudy.com
> > > Subject: BGP REGULAR EXPRESSION
> > >
> > > Guys,
> > >
> > > Does anyone know where regular expression are documented in Cisco
> > > documentation DVD for ccie lab
> > >
> > > One more question do you know any good reference for regular
> expression
> > > which will make complex expression easier to understand and what
you
> > need
> > > to
> > > hit before you can type? In as-path list.
> > >
> > > Example
> > >
> > > ([1-9]+)?
> > >
> > >
> > >
> > > Ubaid
> > >
> > >
>
This archive was generated by hypermail 2.1.4 : Sat Apr 01 2006 - 10:07:37 GMT-3