[nsp] as-path regex matching

From: blast (blast@broder.com)
Date: Fri Feb 20 1998 - 17:22:08 EST


I have some questions on regex matching used by 'as-path access-list'.

1) Can I assume that if I do a 'sh ip bgp regex _666$'
and get output listing matches that an access-list of
'ip as-path access-list 5 permit _666$' will be successful
(assuming that I have attached the as-path access-list number
to a valid filter-list or route-map)?
I am just trying to be sure that I have a way to test my
expressions before committing them to an as-path access-list.

2) There are some AS's on the Internet where doing a
_NUMBER$ will not help you match for the ORIGIN AS because
some intermediate AS has aggregated the NUMBER in to
an AS_SET.
An example would be doing a 'sh ip bgp regex _666$' and not
getting a match but then if you do a 'sh ip bgp regex 666'
will output (among other unwanted things) AS 666 as a part
of an AS_SET that has been aggregated like
111 222 {666,555,444} i
333 222 {444,666} ?
555 222 {777,666,888} i
Lets say that AS666 in this case did not appear to my
router in any other form but in an AS_SET aggregated by
some router in AS222 then what do people use to match
AS666 as the ORIGIN.

My guess is something like [{, ]666[}, ] but there still
are problems.

The Cisco docs read that '_' should match for [,{}()^$ ]
(ie comma, right left brace, right left parens, begin
 of line, end of line and space respectively)
It does not do this at least in image rsp-jsv-mz.112-9.P

The problem with my [{, ]666[}, ] is that ' 666 ' will
match and that is not a ORIGIN AS.

Any feedback is appreciated,
-Tim Keanini
   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   \ Tim Keanini | "The limits of my language, /
   / | are the limits of my world." \
   \ blast@broder.com | --Ludwig Wittgenstein /
   \ +================================================/
   |Key fingerprint = 7B 68 88 41 A8 74 AB EC F0 37 98 4C 37 F7 40 D6 |
   / PUB KEY: http://www-swiss.ai.mit.edu/~bal/pks-commands.html \
   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%



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