RE: regex for as-path

From: Dennis J. Hartmann (dennisjhartmann@hotmail.com)
Date: Wed May 25 2005 - 11:04:43 GMT-3


    If I don't have access to www.cisco.com/univercd during the lab, I think
I'm going to get up and leave. What's the rule? I know Cisco is making the
rules, but I believe you're supposed to be given that tool.
 

Sincerely,

 

Dennis J. Hartmann

White Pine Communications

dh8@pobox.com

CCSI#23402/CCIP/CCNP/CCDP/CCNA/CCDA

Cisco IP Voice Support & Design Specialist

Cisco Optical, VPN & IDS Specialist

MCSE

 

 

  _____

From: SIMON HART [mailto:simon.hart@btinternet.com]
Sent: Wednesday, May 25, 2005 9:13 AM
To: Dennis J. Hartmann; 'GroupStudy'
Subject: Re: regex for as-path

Hi Dennis,
 
good shout, on this. In fact I stumbled over this recently within the
DocCd.
 
Just would not bet on having access to the DocCd when you do your lab. I
didn't !!
 
Simon

"Dennis J. Hartmann" <dennisjhartmann@hotmail.com> wrote:

I created this E-Mail before stumbling across this quote in the BGP
Configuration Guide:

See the "Regular Expressions" appendix in the Cisco IOS Terminal Services
Configuration Guide for more information on forming regular expressions

Does anyone know if there is documentation on Regular Expressions
somewhere on the UNIVERCD site? Please disregard now that I know it's in
the termal services configuration guide.

I don't like to post to the list with just a question, so I'll share
some of my regular expression information below:

Matches any single character
* Matches zero or more sequences of the pattern
^ Begins with
$ End with
[5-9] or [56789] Matches one character in the range of 5 through 9
(123) Matches AS 123
+ Matches one or more sequences of the pattern
_ Matches the following: , { } ( ) ^ $ Blank Space

Examples

_200_ Matches an instance of AS 200 ANYWHERE in the AS-PATH

^200_ AS-Path begins with (originated from) AS 200

^200(_200)*$ Begins with and ends with (directly connected to) AS 200
with one (or more) instances of AS 200 due to AS-PATH prepending

200$ AS-PATH ends with AS 200 (AS 200 is the last AS that the BGP
path traversed).

^([0-9]+)(_\1)*$ Matches one or more instance of a neighboring AS. I
don't understand the (_\1) myself. If anyone has a better understanding of
this, please share.

* Permit ANY

\(200 Matches (200 which could be seen in a BGP Community's
AS-PATH. The \ matches any one special character. In this case, the
special character is the (.

Sincerely,

Dennis J. Hartmann

White Pine Communications

dh8@pobox.com

CCSI#23402/CCIP/CCNP/CCDP/CCNA/CCDA

Cisco IP Voice Support & Design Specialist

Cisco Optical, VPN & IDS Specialist

MCSE



This archive was generated by hypermail 2.1.4 : Fri Jun 03 2005 - 10:12:02 GMT-3