Re: BGP regex

From: John (jgarrison1@austin.rr.com)
Date: Wed Aug 13 2008 - 20:57:32 ART


Ahhhh "zero or one instance". I see said the blind man. I couldn't get why
I wasn't getting AS 54 using the first example. It now makes sense

Thanks a lot
----- Original Message -----
From: "Bill Eyer" <beyer@optonline.net>
To: "John" <jgarrison1@austin.rr.com>
Cc: <ccielab@groupstudy.com>
Sent: Wednesday, August 13, 2008 5:20 PM
Subject: Re: BGP regex

> 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.
>
> http://www.cisco.com/en/US/docs/ios/fundamentals/configuration/guide/cf_cli-basics_ps6350_TSD_Products_Configuration_Guide_Chapter.html#wp1002051
>
> 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