RE: [nsp] regexp pattern recall

From: David Sinn (dsinn@microsoft.com)
Date: Mon Jul 15 2002 - 11:01:13 EDT


The documentation is incorrect. IOS does not have a pattern recall
function.

There is no way to accurately do what you are trying because Cisco
didn't implement pattern recall.

You can try hacks that deal with not so granular pattern matches keyed
off of specific parts of the ACL's (i.e. look for AS paths where you
have multiple entries that all end in 1). This will not always catch
all prepend's, and will catch some percentage of routes that aren't
actually prepended.

David

-----Original Message-----
From: Pete Kruckenberg [mailto:pete@kruckenberg.com]
Sent: Saturday, July 13, 2002 9:21 PM
To: cisco-nsp@puck.nether.net
Subject: [nsp] regexp pattern recall

At the risk of looking really stupid when someone points out
my obvious error:

I am trying to develop a regexp to match prepended AS paths,
to distinguish "1 2 3" from "1 2 2 3" or "1 2 3 3" or "1 1 2
3". This exercise is to de-preference prepended routes in my
BGP policy (so those prepends aren't over-ridden by
preferences based on community matches).

According to CCO I can use the regexp pattern recall
operator \ to do this.
http://www.cisco.com/univercd/cc/td/doc/product/atm/c8540/12_0/13_19/cmd
_ref/appc.htm

But a "show ip bgp regexp ([0-9]+)_\1_" only shows AS paths
with an AS number followed by ASN 1 (eg "1239 1"). I have
also tried "show ip bgp regexp ([0-9]+)_(\1_)+" and several
other derivatives, which all do the same thing. I have tried
this on 12.0.16-S3, 12.0.21-S1 and 12.2.3.

Does the regexp pattern recall operator work (am I maybe
using it wrong)?

Is there another way to accomplish what I'm trying to do?

Thanks for your help.

Pete.



This archive was generated by hypermail 2b29 : Sun Aug 04 2002 - 04:12:04 EDT