[c-nsp] BGP inbound route maps

steve at telecomplete.co.uk steve at telecomplete.co.uk
Thu Sep 28 05:55:00 EDT 2006


correction below!

On Thu, Sep 28, 2006 at 09:56:21AM +0100, steve at telecomplete.co.uk wrote:
> Hi,
>  google for regex if you want tutorials..
> 
> you originally have:
>  ip as-path access-list 77 permit ^ABCD$
>  ip as-path access-list 77 permit ^(ABCD_)+[0-9]+$
>  ip as-path access-list 77 permit ^(ABCD_)+[0-9]+[0-9]+$
> 
> So, yours says as-paths that are either the peer or multiple prepends of the peer plus another ASN. The key thing is you miss the spacer ("_") so if you wanted to get one or two other ASNs in the path you wont match it, only one.
> 
> What is it you want exactly?
> 
> Having:
>  ip as-path access-list 77 permit ^(ABCD_)+$
>  ip as-path access-list 77 permit ^(ABCD_)+_[0-9]+$
>  ip as-path access-list 77 permit ^(ABCD_)+_[0-9]+_[0-9]+$

sorry this should read:
  ip as-path access-list 77 permit ^(ABCD_)+$
  ip as-path access-list 77 permit ^(ABCD_)+[0-9]+$
  ip as-path access-list 77 permit ^(ABCD_)+[0-9]+_[0-9]+$

> 
> will get you the peer ASN once or multiple times, plus 0, 1 or 2 ASNs after it which I think is what you want?
> 
> Steve
> 
> On Thu, Sep 28, 2006 at 04:34:37PM +0800, Kanagaraj Krishna wrote:
> > Hi,
> >     What does the added expressions mean? 
> > 
> > +_[0-9]+_.*    
> > 
> > Are there any proper tutorial or manual for this expressions? Most of the stuff that I found have only basic examples. Thanks.
> > 
> > Regards,
> > Kana
> >   ----- Original Message ----- 
> >   From: hjan 
> >   To: Kanagaraj Krishna 
> >   Sent: Saturday, September 16, 2006 5:09 PM
> >   Subject: Re: [c-nsp] BGP inbound route maps
> > 
> > 
> >   From: "Kanagaraj Krishna" <kanagaraj at aims.com.my>
> >   > Hi,
> >   >   We are trying to set local preference 90 for specific inbound routes 
> >   > only.
> >   > The specific routes are:
> >   >...............
> >   > neighbor xxx.xxx.xxx.xxx remote-as ABCD
> >   > neighbor xxx.xxx.xxx.xxx route-map test-inbound in
> >   > neighbor xxx.xxx.xxx.xxx route-map test-outbound out
> >   >
> >   > ip as-path access-list 77 permit ^ABCD$
> >   > ip as-path access-list 77 permit ^(ABCD_)+[0-9]+$
> >   > ip as-path access-list 77 permit ^(ABCD_)+[0-9]+[0-9]+$
> >   >
> > 
> >   Try
> >   ip as-path access-list 77 permit ^(ABCD_)+[0-9]+_[0-9]+_.*
> >   as your third statement.
> > 
> >   Regards,
> >   Gianluca
> > _______________________________________________
> > cisco-nsp mailing list  cisco-nsp at puck.nether.net
> > https://puck.nether.net/mailman/listinfo/cisco-nsp
> > archive at http://puck.nether.net/pipermail/cisco-nsp/
> 
> -- 
> Stephen J. Wilcox
> BSc (Hons).  CCIE #10730
> Technical Director, Telecomplete
> http://www.telecomplete.co.uk/
> 
> _______________________________________________
> cisco-nsp mailing list  cisco-nsp at puck.nether.net
> https://puck.nether.net/mailman/listinfo/cisco-nsp
> archive at http://puck.nether.net/pipermail/cisco-nsp/

-- 
Stephen J. Wilcox
BSc (Hons).  CCIE #10730
Technical Director, Telecomplete
http://www.telecomplete.co.uk/



More information about the cisco-nsp mailing list