From: Michael Snyder (msnyder@xxxxxxx)
Date: Thu Aug 22 2002 - 22:38:08 GMT-3
The compound piece with the included space seems to be it.
Brian, you can send that complete free lab package now (grin)
show ip bgp regexp ^7018( [0-9]*)* 23096( [0-9]*)* 23096$
BGP table version is 2102712, local router ID is 12.0.1.28
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
*> 12.162.114.0/23 12.123.25.245 0 7018 701
23096 23096 23096 23096 23096 23096 23096 i
* 12.123.41.250 0 7018 701
23096 23096 23096 23096 23096 23096 23096 i
* 12.123.29.249 0 7018 701
23096 23096 23096 23096 23096 23096 23096 i
* 12.123.137.124 0 7018 701
23096 23096 23096 23096 23096 23096 23096 i
* 12.123.37.250 0 7018 701
23096 23096 23096 23096 23096 23096 23096 i
* 12.123.196.111 0 7018 701
23096 23096 23096 23096 23096 23096 23096 i
* 12.123.5.240 0 7018 701
23096 23096 23096 23096 23096 23096 23096 i
* 12.123.9.241 0 7018 701
23096 23096 23096 23096 23096 23096 23096 i
* 12.123.33.249 0 7018 701
23096 23096 23096 23096 23096 23096 23096 i
* 12.123.45.252 0 7018 701
23096 23096 23096 23096 23096 23096 23096 i
* 12.123.1.236 0 7018 701
23096 23096 23096 23096 23096 23096 23096 i
Network Next Hop Metric LocPrf Weight Path
* 12.123.142.124 0 7018 701
23096 23096 23096 23096 23096 23096 23096 i
* 12.123.145.124 0 7018 701
23096 23096 23096 23096 23096 23096 23096 i
* 12.123.13.241 0 7018 701
23096 23096 23096 23096 23096 23096 23096 i
* 12.123.21.243 0 7018 701
23096 23096 23096 23096 23096 23096 23096 i
* 12.123.17.244 0 7018 701
23096 23096 23096 23096 23096 23096 23096 i
* 12.123.139.124 0 7018 701
23096 23096 23096 23096 23096 23096 23096 i
* 12.123.203.174 0 7018 701
23096 23096 23096 23096 23096 23096 23096 i
* 12.123.133.124 0 7018 701
23096 23096 23096 23096 23096 23096 23096 i
* 12.123.134.124 0 7018 701
23096 23096 23096 23096 23096 23096 23096 i
* 63.94.89.0/24 12.123.221.15 0 7018 23096
23096 23096 23096 23096 23096 23096 23096 23096 23096 23096 i
* 12.123.199.239 0 7018 23096
23096 23096 23096 23096 23096 23096 23096 23096 23096 23096 i
* 192.205.31.33 0 7018 23096
23096 23096 23096 23096 23096 23096 23096 23096 23096 23096 i
*> 12.123.1.234 0 7018 23096
23096 23096 23096 23096 23096 23096 23096 23096 23096 23096 i
Network Next Hop Metric LocPrf Weight Path
* 12.123.196.111 0 7018 23096
23096 23096 23096 23096 23096 23096 23096 23096 23096 23096 i
* 12.123.9.241 0 7018 23096
23096 23096 23096 23096 23096 23096 23096 23096 23096 23096 i
* 12.123.17.244 0 7018 23096
23096 23096 23096 23096 23096 23096 23096 23096 23096 23096 i
* 12.123.21.243 0 7018 23096
23096 23096 23096 23096 23096 23096 23096 23096 23096 23096 i
* 12.123.1.236 0 7018 23096
23096 23096 23096 23096 23096 23096 23096 23096 23096 23096 i
* 12.123.41.250 0 7018 23096
23096 23096 23096 23096 23096 23096 23096 23096 23096 23096 i
* 12.123.37.250 0 7018 23096
23096 23096 23096 23096 23096 23096 23096 23096 23096 23096 i
* 12.123.145.124 0 7018 23096
23096 23096 23096 23096 23096 23096 23096 23096 23096 23096 i
* 12.123.33.249 0 7018 23096
23096 23096 23096 23096 23096 23096 23096 23096 23096 23096 i
* 12.123.25.245 0 7018 23096
23096 23096 23096 23096 23096 23096 23096 23096 23096 23096 i
* 12.123.45.252 0 7018 23096
23096 23096 23096 23096 23096 23096 23096 23096 23096 23096 i
* 12.123.142.124 0 7018 23096
23096 23096 23096 23096 23096 23096 23096 23096 23096 23096 i
* 12.123.29.249 0 7018 23096
23096 23096 23096 23096 23096 23096 23096 23096 23096 23096 i
Network Next Hop Metric LocPrf Weight Path
* 12.123.139.124 0 7018 23096
23096 23096 23096 23096 23096 23096 23096 23096 23096 23096 i
* 12.123.134.124 0 7018 23096
23096 23096 23096 23096 23096 23096 23096 23096 23096 23096 i
* 12.123.137.124 0 7018 23096
23096 23096 23096 23096 23096 23096 23096 23096 23096 23096 i
* 12.123.133.124 0 7018 23096
23096 23096 23096 23096 23096 23096 23096 23096 23096 23096 i
* 12.123.5.240 0 7018 23096
23096 23096 23096 23096 23096 23096 23096 23096 23096 23096 i
* 12.123.13.241 0 7018 23096
23096 23096 23096 23096 23096 23096 23096 23096 23096 23096 i
* 63.94.90.0/24 12.123.221.15 0 7018 23096
23096 23096 23096 23096 23096 i
* 192.205.31.33 0 7018 23096
23096 23096 23096 23096 23096 i
*> 12.123.1.234 0 7018 23096
23096 23096 23096 23096 23096 i
* 12.123.196.111 0 7018 23096
23096 23096 23096 23096 23096 i
* 12.123.199.239 0 7018 23096
23096 23096 23096 23096 23096 i
* 12.123.9.241 0 7018 23096
23096 23096 23096 23096 23096 i
* 12.123.17.244 0 7018 23096
23096 23096 23096 23096 23096 i
Network Next Hop Metric LocPrf Weight Path
* 12.123.1.236 0 7018 23096
23096 23096 23096 23096 23096 i
* 12.123.41.250 0 7018 23096
23096 23096 23096 23096 23096 i
* 12.123.29.249 0 7018 23096
23096 23096 23096 23096 23096 i
* 12.123.45.252 0 7018 23096
23096 23096 23096 23096 23096 i
* 12.123.21.243 0 7018 23096
23096 23096 23096 23096 23096 i
* 12.123.139.124 0 7018 23096
23096 23096 23096 23096 23096 i
* 12.123.25.245 0 7018 23096
23096 23096 23096 23096 23096 i
* 12.123.37.250 0 7018 23096
23096 23096 23096 23096 23096 i
* 12.123.33.249 0 7018 23096
23096 23096 23096 23096 23096 i
* 12.123.142.124 0 7018 23096
23096 23096 23096 23096 23096 i
* 12.123.145.124 0 7018 23096
23096 23096 23096 23096 23096 i
* 12.123.133.124 0 7018 23096
23096 23096 23096 23096 23096 i
* 12.123.137.124 0 7018 23096
23096 23096 23096 23096 23096 i
Network Next Hop Metric LocPrf Weight Path
* 12.123.134.124 0 7018 23096
23096 23096 23096 23096 23096 i
* 12.123.5.240 0 7018 23096
23096 23096 23096 23096 23096 i
* 12.123.13.241 0 7018 23096
23096 23096 23096 23096 23096 i
* 208.218.158.0 12.123.9.241 0 7018 701
23096 23096 i
* 12.123.21.243 0 7018 701
23096 23096 i
* 12.123.41.250 0 7018 701
23096 23096 i
* 12.123.17.244 0 7018 701
23096 23096 i
* 12.123.139.124 0 7018 701
23096 23096 i
* 12.123.25.245 0 7018 701
23096 23096 i
* 12.123.37.250 0 7018 701
23096 23096 i
* 12.123.133.124 0 7018 701
23096 23096 i
* 12.123.137.124 0 7018 701
23096 23096 i
* 12.123.134.124 0 7018 701
23096 23096 i
* 12.123.145.124 0 7018 701
23096 23096 i
* 12.123.29.249 0 7018 701
23096 23096 i
*> 12.123.5.240 0 7018 701
23096 23096 i
* 12.123.142.124 0 7018 701
23096 23096 i
* 12.123.45.252 0 7018 701
23096 23096 i
* 12.123.33.249 0 7018 701
23096 23096 i
* 12.123.1.236 0 7018 701
23096 23096 i
* 12.123.13.241 0 7018 701
23096 23096 i
* 12.123.199.239 0 7018 701
23096 23096 i
route-server>
route-server>
-----Original Message-----
From: Bauer, Rick [mailto:BAUERR@toysrus.com]
Sent: Thursday, August 22, 2002 8:08 PM
To: 'Michael Snyder'
Subject: RE: regexp fun
Try this att route-server 12.0.1.28
-----Original Message-----
From: Michael Snyder [mailto:msnyder@ldd.net]
Sent: Thursday, August 22, 2002 7:39 PM
To: 'ying c'
Cc: ccielab@groupstudy.com
Subject: RE: regexp fun
>Taking your 4 conditions, how about
>^1000 ([0-9]*)? 100 ([0-9]*)? 10$
If ([0-9]*)? Nulls out, then you have two spaces between 1000 and 100,
etc.
If it doesn't null out, and you get rid of the spaces, then the as's can
run together.
Try
^1000( .*)* 100( .*)* 10$
It has a space as part of the compound piece, therefore if it nulls out,
we still have the required space in front of 100, etc.
BTW, route-server.exodus.net takes about five minutes to process my
expression, I thought it locked up the first time. Think I just figured
out a DOS attack with a bgp path expression!
-----Original Message-----
From: nobody@groupstudy.com [mailto:nobody@groupstudy.com] On Behalf Of
ying c
Sent: Thursday, August 22, 2002 5:54 PM
To: Edward Monk; 'Bauer, Rick'; ccielab@groupstudy.com
Subject: RE: regexp fun
i.e.
a. if 1st ? = 0, 2nd ? = 1 => ^1000 100 ([0-9]*)? 10$
b. if 1st ? = 1, 2nd ? = 0 => ^1000 ([0-9]*)? 100 10$
c. if 1st ? = 0, 2nd ? = 0 => ^1000 100 10$
d. if 1st ? = 1, 2nd ? = 1 => ^1000 [0-9]* 100 [0-9]*
10$
Chang
--- Edward Monk <emonk@att.net> wrote:
> I used to think that as recent as yesterday. But it
> doesn't meet the
> criteria.
>
> It will match 10000 100 10 for sure.
>
>
> Now think of this logic.
>
> Here was my first working solution that satisfied
> the criteria.
>
> Brian never said be as efficient as possible. (Lame
> excuse)
>
> It took four branches to perform the logic as I
> understood it.
>
> Match 1000 100 10 if not then
> Match 1000 100 ([0-9].*) 10 if not then
> Match 1000 ([0-9].*) 100 10 if not then
> Match 1000 ([0-9].*) 100 ([0-9].*) 10 if not then
> End
>
> This worked out to be in long hand as the following
> expression.
>
> ((^1000 100 10$)|(^1000 100 ([0-9].*) 10$)|(^1000
> ([0-9].*) 100
> 10$)|(^1000 ([0-9].*) 100 ([0-9].*) 10$))
>
> I have since solved this in a very compact solution.
> One I believe is as
> compact as it gets and still meets the criteria that
> Brian laid out.
>
> -----Original Message-----
> From: Bauer, Rick [mailto:BAUERR@toysrus.com]
> Sent: Thursday, August 22, 2002 1:42 PM
> To: 'Edward Monk'; 'ccielab@groupstudy.com'
> Subject: RE: regexp fun (was RE: Filtering BGP
> updates using ip as-path
> ac cess-lists)
>
> What I mean is I am a dumb ass and have been smoking
> crack all day and I
> should stick to doing one thing at a time or at
> least devoting more then
> two
> seconds to reply to something. Yes you are correct
> it is backwards. But
> it
> should work this way.
>
> sho ip bgp reg ^1000 ?.* 100 ?.* 10$
>
>
>
> -----Original Message-----
> From: Edward Monk [mailto:emonk@att.net]
> Sent: Thursday, August 22, 2002 3:36 PM
> To: 'Bauer, Rick'
> Subject: RE: regexp fun (was RE: Filtering BGP
> updates using ip as-path
> ac cess-lists)
>
>
> Yes, your point is what?
>
> -----Original Message-----
> From: Bauer, Rick [mailto:BAUERR@toysrus.com]
> Sent: Thursday, August 22, 2002 1:23 PM
> To: 'Edward Monk'
> Cc: ccielab@groupstudy.com
> Subject: RE: regexp fun (was RE: Filtering BGP
> updates using ip as-path
> ac cess-lists)
>
> I'm giving a "sho ip bgp reg" not an as-path filter.
>
> -----Original Message-----
> From: Edward Monk [mailto:emonk@att.net]
> Sent: Thursday, August 22, 2002 3:18 PM
> To: 'Bauer, Rick'
> Cc: ccielab@groupstudy.com
> Subject: RE: regexp fun (was RE: Filtering BGP
> updates using ip as-path
> ac cess-lists)
>
>
> Still not correct. Besides being reverse logic what
> I mean by that is
> your regexp says match routes originated in AS 1000
> not 10 as Brian's
> criteria called for. But accounting for that it
> still would not work.
>
> The beginning would match 1 10 100 1000 10000 at the
> very least.
>
> -----Original Message-----
> From: nobody@groupstudy.com
> [mailto:nobody@groupstudy.com] On Behalf Of
> Bauer, Rick
> Sent: Thursday, August 22, 2002 12:21 PM
> To: 'Brian McGahan'; 'elping'; 'Michael Snyder'
> Cc: 'ccielab@groupstudy.com'
> Subject: RE: regexp fun (was RE: Filtering BGP
> updates using ip as-path
> ac cess-lists)
>
> Not correct I need another "?"
>
> sh ip bgp reg ^10 ?.* 100 ?.* 1000$
>
> Rick, #9482
>
> -----Original Message-----
> From: Bauer, Rick
> Sent: Thursday, August 22, 2002 2:09 PM
> To: 'Brian McGahan'; 'elping'; 'Michael Snyder'
> Cc: ccielab@groupstudy.com
> Subject: RE: regexp fun (was RE: Filtering BGP
> updates using ip as-path
> access-lists)
>
>
> Okay Brain, you intrigued me. Here is the regular
> expression for your
> question. You helped me find a new use for the "?".
> Cool stuff!
>
> sh ip bgp reg ^10 ?.* 100 .* 1000$
>
> Rick, #9482
>
> -----Original Message-----
> From: Brian McGahan [mailto:brian@cyscoexpert.com]
> Sent: Wednesday, August 21, 2002 10:21 AM
> To: 'Brian McGahan'; 'elping'; 'Michael Snyder'
> Cc: steven.j.nelson@bt.com; ccielab@groupstudy.com
> Subject: regexp fun (was RE: Filtering BGP updates
> using ip as-path
> access-lists)
>
>
> Did we give up already?
>
> <snip>
>
> Try this one: All routes originated in AS 10,
> passed through AS
> 100, and learned from AS 1000. (In one line)
>
> HTH
>
> Brian McGahan, CCIE #8593
> Director of Design and Implementation
> brian@cyscoexpert.com
>
> CyscoExpert Corporation
> Internetwork Consulting & Training
> http://www.cyscoexpert.com
> Voice: 847.674.3392
> Fax: 847.674.2625
>
>
> -----Original Message-----
> From: nobody@groupstudy.com
> [mailto:nobody@groupstudy.com] On Behalf Of
> elping
> Sent: Sunday, August 18, 2002 9:46 AM
> To: Michael Snyder
> Cc: steven.j.nelson@bt.com; ccielab@groupstudy.com
> Subject: Re: Filtering BGP updates using ip as-path
> access-lists
>
> steve :
> consider that
> ^4 [0-9]* will be an exact 4 and some other number
> so any routes coming from 4 will not show up...
>
> i put your theory to the test on an actual Bgp
> routing table observ.
> I am using 7788 and all it's connected routes..
>
> in summary the underscore will allow 7788 routes and
> it's
> connected...without the underscore
> you are saying a exact 7788 and it's
> connected.....see for yourself...
>
> if i mistyped or got you thoughts wrong feel free to
> correct..
>
>
>
> using your string i obtain nothing
> route-server.east>sh ip bgp reg ^7788 [0-9]* [0-9]*$
> route-server.east>
>
>
=== message truncated ===
This archive was generated by hypermail 2.1.4 : Sat Sep 07 2002 - 19:48:34 GMT-3