[nsp] BGP regex - directly connected routes ?

Mark E. Mallett mem@mv.mv.com
Mon, 12 Aug 2002 19:58:28 -0400


I don't think the cisco regexp supports match recall so you can't
construct a regexp that says "repeat what matched."  However..


> I was looking for a regex that would replace the need to mention every
> directly attached AS, not directly attached and their downstreams.
> 
> For instance, I have peers AS5555 and AS4444 and AS3333.  Instead of three
> seperate regexp's, can I do it all in one?

Is it that you don't want to enumerate the AS's, or that you don't want
multiple regexps... 'cuz there's a difference.  I think (tho somebody
may know better) the best you can do is list paths with ONLY your
neighbor AS's in them, but you'd have to enumerate the ones you want.
That would be OK if you can assume you wouldn't be seeing one of your
neighbor AS's in a path from another one of your neighbors, but that
may not be the case.

Anyway something like:

   show ip bgp regexp ^(5555_|4444_|3333_)+$

would, I think, show you paths with only those ASs in them.  As I say,
if you don't expect to see one neighbor's AS in a path learned from
another, that would probably be sufficient.

mm