Re: [nsp] as-path regex matching

From: Danny McPherson (danny@genuity.net)
Date: Sat Feb 21 1998 - 01:39:42 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.

Sure, that should work. Another option is to create the as-path list, then
view the matches via "sh ip bgp filter-list [number]" .. then apply the policy.

> 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.
[snip...]
> The problem with my [{, ]666[}, ] is that ' 666 ' will
> match and that is not a ORIGIN AS.

Ugly as it may be, I suppose something like:

({|.*,)666(,.*|})$

would suffice.. Of course, a quick search doesn't return any AS_SET that
isn't at the ORIGIN of the path anyways (today).

-danny



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