From: Bill Eyer (beyer@optonline.net)
Date: Wed Aug 13 2008 - 20:20:56 ART
John,
The first one will allow only only as paths with 54 AND one other AS
number, the second will allow paths with 54 or 54 and one more AS
number. The difference is the ? it allows for either 54 and another
string or 54 only. Without the questions mark you HAVE to have 2 as
strings in you AS path. Here is an example output of each. In this
case it the example is as-path 7018, just because I ran the example
against one of the routers on our network, but I think you will see what
I mean. Just as any FYI, it took me a forever to find the bgp regexp
expressions on the DOC cd, you can find it in configuration fundimentals
just in case you find it as hard to find as I did. I looked forever in
the BGP section.
Sincerely,
Bill
ctcatt#sh ip bgp regexp ^7018_([0-9]+)$
BGP table version is 96789827, local router ID is 216.223.15.130
Status codes: s suppressed, d damped, h history, * valid, > best, i -
internal,
S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
*> 4.0.0.0/9 12.87.72.25 200 0 7018 3356 i
*> 4.0.0.0 12.87.72.25 200 0 7018 3356 i
*> 4.128.0.0/9 12.87.72.25 200 0 7018 3356 i
*> 8.0.0.0/9 12.87.72.25 200 0 7018 3356
...
ctcatt#sh ip bgp regexp ^7018_([0-9]+)?$
BGP table version is 96789849, local router ID is 216.223.15.130
Status codes: s suppressed, d damped, h history, * valid, > best, i -
internal,
S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
*> 4.0.0.0/9 12.87.72.25 200 0 7018 3356 i
*> 4.0.0.0 12.87.72.25 200 0 7018 3356 i
*> 4.128.0.0/9 12.87.72.25 200 0 7018 3356 i
*> 4.224.56.0/24 12.87.72.25 200 0 7018 ?
*> 8.0.0.0/9 12.87.72.25 200 0 7018 3356 i
*> 8.0.0.0 12.87.72.25 200 0 7018 3356 i
*> 8.2.64.0/23 12.87.72.25 200 0 7018 16803 i
*> 8.11.167.0/24 12.87.72.25 200 0 7018 40331 i
*> 8.128.0.0/9 12.87.72.25 200 0 7018 3356 i
*> 12.0.0.0/9 12.87.72.25 200 0 7018 i
*> 12.0.0.0 12.87.72.25 200 0 7018 ii
*> 8.0.0.0 12.87.72.25 200 0 7018 3356 i
*> 8.2.64.0/23 12.87.72.25 200 0 7018 16803 i
*> 8.11.167.0/24 12.87.72.25 200 0 7018 40331 i
*> 8.128.0.0/9 12.87.72.25 200 0 7018 3356 i
....
John wrote:
> Need a little explanation
>
> AS path access list 1 permit ^54(_[0-9]+)$
>
>
> AS path access list 2 permit ^54(_[0-9]+)?$
>
> To me the #1 should permit as 54 and one other as, but it doesn't. The second
> one does allow as 54 and another as. I guess my question is do I need
> something like ? or + after the (_[0-9]+) to make the grouping valid? I know
> I'm not asking in a very intelligable manner, but I find this a little
> confusing
>
>
> Blogs and organic groups at http://www.ccie.net
>
> _______________________________________________________________________
> Subscription information may be found at:
> http://www.groupstudy.com/list/CCIELab.html
Blogs and organic groups at http://www.ccie.net
This archive was generated by hypermail 2.1.4 : Mon Sep 01 2008 - 08:15:30 ART