From: Andy Hogard (andyhogard@gmail.com)
Date: Thu Dec 18 2008 - 18:41:18 ARST
Ok,
I am sorry to say but my proposed solutions do not work ya,
R2#sh ip bgp
BGP table version is 4, local router ID is 155.1.23.2
Status codes: s suppressed, d damped, h history, * valid, > best, i -
internal,
r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
*> 3.0.0.0 155.1.23.3 0 100 0 (64530) i
*> 155.1.5.0/24 155.1.0.5 0 0 100 i
*> 204.12.1.0 155.1.13.1 0 100 0 (64530 64510)
300 i
R2#
On this table, so far what works is this --> ^(\([0-9]*)
R2#sh ip bgp regexp ^(\([0-9]*)
BGP table version is 4, local router ID is 155.1.23.2
Status codes: s suppressed, d damped, h history, * valid, > best, i -
internal,
r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
*> 3.0.0.0 155.1.23.3 0 100 0 (64530) i
*> 204.12.1.0 155.1.13.1 0 100 0 (64530 64510)
300 i
R2#
I even made some modifications to the routing table of R3, such that the
table on R2 would like as shown below,
R2#sh ip bgp
BGP table version is 12, local router ID is 155.1.23.2
Status codes: s suppressed, d damped, h history, * valid, > best, i -
internal,
r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
*> 3.0.0.0 155.1.23.3 0 100 0 (64530) i
*> 33.0.0.0 155.1.23.3 0 100 0 (64530 64500
64600) i
*> 155.1.5.0/24 155.1.0.5 0 0 100 i
*> 204.12.1.0 155.1.13.1 0 100 0 (64530 64510)
300 i
R2#
And again tested the, regexp of ^(\([0-9]*)
R2#sh ip bgp regexp ^(\([0-9]*)
BGP table version is 12, local router ID is 155.1.23.2
Status codes: s suppressed, d damped, h history, * valid, > best, i -
internal,
r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
*> 3.0.0.0 155.1.23.3 0 100 0 (64530) i
*> 33.0.0.0 155.1.23.3 0 100 0 (64530 64500
64600) i
*> 204.12.1.0 155.1.13.1 0 100 0 (64530 64510)
300 i
R2#
Its clear that from the as-path of (64530 64510) 300 its just matching
the*(64530
* 64510) 300 highlighted part.
Finally lets test the well know, regexp made for this purpose and posted on
the IE blog.. ^(\(.+\))?$
R2#sh ip bgp regexp ^(\(.+\))?$
BGP table version is 12, local router ID is 155.1.23.2
Status codes: s suppressed, d damped, h history, * valid, > best, i -
internal,
r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
*> 3.0.0.0 155.1.23.3 0 100 0 (64530) i
*> 33.0.0.0 155.1.23.3 0 100 0 (64530 64500
64600) i
R2#
Hah! This one also just matched two routes, where as it should have hit
three prefixes ya. Now can we all together complete this complex mess.
Dead, tired hitting the bed.
Greets,
Andy.
On Thu, Dec 18, 2008 at 11:45 PM, Andy Hogard <andyhogard@gmail.com> wrote:
> Yep, the best would be to put it to test on a lab. Will do that in the
> morning ya. Its night here, actually I came up with the solutions using your
> ideas and how you explained in the one of the vods ya.
>
> Will update you and the list in sometime, actually I am itching already. So
> let me build a quick scenario ..and lets see how all three do.
>
> Regards,
> Andy.
>
>
> On Thu, Dec 18, 2008 at 11:40 PM, Scott Morris <
> smorris@internetworkexpert.com> wrote:
>
>> Since you are specifically looking for things inside a confederation, the
>> "(" and ")" are the parts we care about.
>>
>> My only concern about the first one you lise is that you are looking for 0
>> or 1 (the ?) of ([0-9]*_) which would match none or one AS that must be
>> inside ( ) for a confederation.
>>
>> The second one will definitely work with your example below as it's
>> permitting any characters (numbers or spaces) as long as they are
>> contained
>> within the ( ) for a confederation.
>>
>> I don't have a confederation currently setup in my lab, so I can't
>> specifically test out the first one, but when it came to the AS Path you
>> listed below with multiple intra-confed ASNs listed, I would be curious as
>> to whether it matched or not.
>>
>>
>> Scott Morris, CCIE4 #4713, JNCIE-M #153, JNCIS-ER, CISSP, et al.
>> CCSI/JNCI-M/JNCI-ER
>> Senior CCIE Instructor
>>
>> smorris@internetworkexpert.com
>>
>>
>>
>> Knowledge is power.
>> Power corrupts.
>> Study hard and be Eeeeviiiil......
>>
>>
>> -----Original Message-----
>> From: nobody@groupstudy.com [mailto:nobody@groupstudy.com] On Behalf Of
>> Andy
>> Hogard
>> Sent: Thursday, December 18, 2008 2:07 AM
>> To: Cisco certification
>> Subject: Re: BGP regexp, doubt..?!
>>
>> Sorry one last final correction, ^\(([0-9]*_)?\)$ <==> ^(\(.+\))?$ . Yep
>> are the two regexp the same ?! :)
>>
>> Might have looked like I was just losing my remaning hair over it.. lol.
>>
>>
>> Greets!
>>
>> On Thu, Dec 18, 2008 at 12:18 PM, Andy Hogard <andyhogard@gmail.com>
>> wrote:
>>
>> > Actually looks like I made a small typo, it should be is
>> > ^(\([0-9]*_)?\)$ <==> ^(\(.+\))?$ ..!? :)
>> >
>> >
>> > Regards,
>> > Andy,
>> >
>> > PS: I will consider regexp done if I get this correct!! :D
>> >
>> > On Thu, Dec 18, 2008 at 12:13 PM, Andy Hogard <andyhogard@gmail.com
>> >wrote:
>> >
>> >> Hi folks,
>> >>
>> >>
>> >> I just wanted to know whether ^(\([0-9]*_\))?$ <==> ^(\(.+\))?$
>> ..?!
>> >> Let me know what you think, my goal was to prevent a confederated AS
>> >> from becoming a transit path, the reg exp that you see on your left
>> >> is what I came up with and on the left that's a well know one from
>> >> the IE blog. To me both seem to be the same,
>> >>
>> >> I will try and explain in brief here:
>> >>
>> >> (65535 64512 64513) thats how the as path would be like for the
>> >> routes that originated within the AS. I need to match these and be
>> >> able to export these out to the external AS ..whereas others which
>> >> have (65535 64512 64513) 100 200 300 must be blocked.
>> >>
>> >> So [0-9] is my atom here, since I can have zero or multiple instances
>> >> of these will use it with a *
>> >>
>> >> Hence arrive at [0-9]* , I need to match ( ) which is a special
>> >> character so I will use "\", but before that a bracket operation for
>> >> my atom. And obviously I will encose them within ^$, as thats what I
>> need
>> in my as path.
>> >> My doubt here is that do I have to use [0-9]*_ as my atom or is just
>> >> [0-9]* enough to match the blank spaces separating the two intra confed
>> as nos. ya.
>> >>
>> >>
>> >> Let your thoughts and comments flow
>> >>
>> >>
>> >> Regards,
>> >> Andy.
>> >> --
>> >> My Blog URL: http://ccieno.blogspot.com/
>> >>
>> >
>> >
>> >
>> > --
>> > My Blog URL: http://ccieno.blogspot.com/
>> >
>>
>>
>>
>> --
>> My Blog URL: http://ccieno.blogspot.com/
>>
>>
>> Blogs and organic groups at http://www.ccie.net
>>
>> _______________________________________________________________________
>> Subscription information may be found at:
>> http://www.groupstudy.com/list/CCIELab.html
>>
>>
>>
>>
>>
>>
>>
>>
>
>
> --
> My Blog URL: http://ccieno.blogspot.com/
>
-- My Blog URL: http://ccieno.blogspot.com/Blogs and organic groups at http://www.ccie.net
This archive was generated by hypermail 2.1.4 : Thu Jan 01 2009 - 12:53:09 ARST