RE: BGP AS Path Access List and Filter List Question

From: Scott Morris (swm@emanon.com)
Date: Fri Jun 16 2006 - 14:37:36 ART


Oops. You're correct. * is 0 or more which ending with your _ as a literal
will still include end of string. The dysfunctional grep engine in my head
was changing that to a '+' (1 or more) which of course would not work.

;)

 
Scott Morris, CCIE4 (R&S/ISP-Dial/Security/Service Provider) #4713, JNCIE
#153, CISSP, et al.
CCSI/JNCI
IPExpert CCIE Program Manager
IPExpert Sr. Technical Instructor
smorris@ipexpert.com
http://www.ipexpert.com
 
 

-----Original Message-----
From: nobody@groupstudy.com [mailto:nobody@groupstudy.com] On Behalf Of
Elias Chari
Sent: Friday, June 16, 2006 12:46 PM
To: Victor Cappuccio
Cc: Albert Ip; ccielab@groupstudy.com
Subject: Re: BGP AS Path Access List and Filter List Question

Guys,

 ^254_[0-9]*$ will also match only AS 254.

Sorry for the long text, it's from a public route server...

1. The first part shows the output of: sh ip bgp rege ^3356_ just to
collect anything starting with 3356.

2. Second output shows that sh ip bgp regexp ^3356_[0-9]*$ also matches
routes with only 3356 in the path.

===================

* i8.0.0.0/9 67.17.64.89 100 200 0 3356 i
* i 67.17.64.89 100 200 0 3356 i
* i 67.17.64.89 100 200 0 3356 i
* i 67.17.64.89 100 200 0 3356 i
*>i 67.17.64.89 100 200 0 3356 i
* i 67.17.64.89 100 200 0 3356 i
* i 67.17.64.89 100 200 0 3356 i
* i 67.17.64.89 100 200 0 3356 i
* i 67.17.64.89 100 200 0 3356 i
* i 67.17.64.89 100 200 0 3356 i
* i 67.17.64.89 100 200 0 3356 i
* i8.2.64.0/23 67.17.64.89 100 200 0 3356 16803 i
* i 67.17.64.89 100 200 0 3356 16803 i
* i 67.17.64.89 100 200 0 3356 16803 i
* i 67.17.64.89 100 200 0 3356 16803 i
*>i 67.17.64.89 100 200 0 3356 16803 i
* i 67.17.64.89 100 200 0 3356 16803 i
* i 67.17.64.89 100 200 0 3356 16803 i
* i 67.17.64.89 100 200 0 3356 16803 i
* i 67.17.64.89 100 200 0 3356 16803 i
* i 67.17.64.89 100 200 0 3356 16803 i
* i 67.17.64.89 100 200 0 3356 16803 i
* i8.3.12.0/24 67.17.64.89 100 200 0 3356 14711 i
* i 67.17.64.89 100 200 0 3356 14711 i
* i 67.17.64.89 100 200 0 3356 14711 i
* i 67.17.64.89 100 200 0 3356 14711 i
*>i 67.17.64.89 100 200 0 3356 14711 i

=================================

* i8.0.0.0/9 67.17.64.89 100 200 0 3356 i
* i 67.17.64.89 100 200 0 3356 i
* i 67.17.64.89 100 200 0 3356 i
* i 67.17.64.89 100 200 0 3356 i
*>i 67.17.64.89 100 200 0 3356 i
* i 67.17.64.89 100 200 0 3356 i
* i 67.17.64.89 100 200 0 3356 i
* i 67.17.64.89 100 200 0 3356 i
* i 67.17.64.89 100 200 0 3356 i
* i 67.17.64.89 100 200 0 3356 i
* i 67.17.64.89 100 200 0 3356 i
* i8.2.64.0/23 67.17.64.89 100 200 0 3356 16803 i
* i 67.17.64.89 100 200 0 3356 16803 i
* i 67.17.64.89 100 200 0 3356 16803 i
* i 67.17.64.89 100 200 0 3356 16803 i
*>i 67.17.64.89 100 200 0 3356 16803 i
* i 67.17.64.89 100 200 0 3356 16803 i
* i 67.17.64.89 100 200 0 3356 16803 i
* i 67.17.64.89 100 200 0 3356 16803 i
* i 67.17.64.89 100 200 0 3356 16803 i
* i 67.17.64.89 100 200 0 3356 16803 i
* i 67.17.64.89 100 200 0 3356 16803 i
* i8.3.12.0/24 67.17.64.89 100 200 0 3356 14711 i
* i 67.17.64.89 100 200 0 3356 14711 i
* i 67.17.64.89 100 200 0 3356 14711 i
* i 67.17.64.89 100 200 0 3356 14711 i
*>i 67.17.64.89 100 200 0 3356 14711 i
* i 67.17.64.89 100 200 0 3356 14711 i
* i 67.17.64.89 100 200 0 3356 14711 i
* i 67.17.64.89 100 200 0 3356 14711 i
* i 67.17.64.89 100 200 0 3356 14711 i
* i 67.17.64.89 100 200 0 3356 14711 i
 --More--

On 6/16/06, Victor Cappuccio <cvictor@protokolgroup.com> wrote:
>
> Hi Albert IMHO the Regular Expression that you posted will match, but
> it will not match routes for the internal 254 Routes couse the
> _underscore_ that you have in the expression So I think that the
> regular expression should be ^254(_[0-9]*)$ Just my opinion here
>
> Regards
> Victor.
>
> -----Mensaje original-----
> De: nobody@groupstudy.com [mailto:nobody@groupstudy.com] En nombre de
> Albert Ip Enviado el: Viernes, 16 de Junio de 2006 05:08 a.m.
> Para: ccielab@groupstudy.com
> Asunto: BGP AS Path Access List and Filter List Question
>
> Hi All,
>
>
> Two BGP routers, BB1 and R1, BB1 in AS 254 and R1 in AS 55, both
> connected in same LAN subnet.
>
> Question 1:
>
> In future, there will be another AS directly connect with AS 254.
> Configure R1 accept BGP routes from BB1 that originate from AS 254 and
> any other AS directly connected to AS 254. Limit to use one filter
> list only.
>
>
> Answer:
>
> R1
>
> ip as-path access-list 1 permit ^254_[0-9]*$
>
> router bgp 55
> nei 150.100.1.254 filter-list 1 in
>
>
> Is this answer correct????
>
>
>
>
>
>
> _______________________________________
> YM - Bw=u0T.'
>
> 4N:b'A(S&3$W:t!A'A*:*B$M$4%i%H/d$U0T.'59'A!A7m'A$W:t.I4N
> /`%_'Y,](l!A%t&s;!8\
> 3#IN(+%"!C
> http://messenger.yahoo.com.hk
>
> ______________________________________________________________________
> _ 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 : Sat Jul 01 2006 - 07:57:33 ART