From: Tim Fletcher (groupstudy@fletchmail.net)
Date: Wed Sep 03 2003 - 00:08:29 GMT-3
There is no string yours would match, but mine wouldn't. The problem is the exact opposite. Yours would not match 123 456, which would meet the original criteria. There was no requirement as far as whether it was originated by or just transitted the AS, so why would it matter. As far a multiple prepend, again it's irrelevant. The requirement was that it transit the 2 ASs. It doesn't matter if either AS is listed more than once.
-Tim Fletcher
At 12:31 AM 9/2/03 -0400, asadovnikov wrote:
>Could you please give me an example of string which my expression would
>match and yours would not.
>
> Mind the combination at the end was to ensure that a route transited
>through, but
> was not originated by an AS in question, the multiple entry (123_)+ was to
> allow for multiple pre-pend with same AS number
>
> With the exception of the above (i.e. your regexp would actualy match both
>routes transited trough
> and originated from) the difference is real small.
>
>Best regards,
>Alexei
>
>P.S. The outer parentses do help regexp to be readable, I was trying to
>make something possible to understand here :)
>
>-----Original Message-----
>From: nobody@groupstudy.com [mailto:nobody@groupstudy.com]On Behalf Of
>Tim Fletcher
>Sent: Sunday, August 31, 2003 4:51 PM
>To: asadovnikov; 'asadovnikov'; 'Nathaly Landry'
>Cc: ccielab@groupstudy.com
>Subject: RE: regular expression
>
>
>You RE would not match "123 456" or "456 123", as well as many other AS
>strings that do meet the criteria, because if the "[0-9]+_" at the end of
>each section. If you eliminate that, it should work.
>
>(_123_([0-9]+_)*(456_)+)|(_456_([0-9]+_)*(123_)+)
>
>But we can clean it up quite a bit, which would make it simpler to read.
>
>First of all, the outer parenthesis don't do anything here,
>
>_123_([0-9]+_)*(456_)+|_456_([0-9]+_)*(123_)+
>
>Next, the (456_)+ and (123_)+ mean we can have 1 or more of these strings.
>Since we only need 1 to meet the criteria, we can simplify this as well.
>
>_123_([0-9]+_)*456_|_456_([0-9]+_)*123_
>
>Lastly, we what's between the 2 ASs we are looking for, so we could replace
>[0-9] with ".".
>
>_123_(.+_)*456_|_456_(.+_)*123_
>
>
>-Tim Fletcher
>
>At 12:55 AM 8/30/03 -0400, asadovnikov wrote:
>>Typo corrected:
>> (_123_([0-9]+_)*(456_)+[0-9]+_)|(_456_([0-9]+_)*(123_)+[0-9]+_)
>>
>>-----Original Message-----
>>From: nobody@groupstudy.com [mailto:nobody@groupstudy.com]On Behalf Of
>>asadovnikov
>>Sent: Saturday, August 30, 2003 12:45 AM
>>To: 'Nathaly Landry'
>>Cc: ccielab@groupstudy.com
>>Subject: RE: regular expression
>>
>>
>>If you look at Internet routing table you will be surprised how many routes
>>of that kind are actually there. Prepending AS path with a number of the
>AS
>>is a standard Internet practice of announcing "backup" route. I.e. if my
>AS
>>is 456, and I am dual-homed to 123 and 124, and I prefer inbound traffic to
>>come via 124, I will send my prefixes 'as is' to 124 and prepend them with
>>456 several times when sending to 123. So say I am announcing 10.0.0.0/8
>>(which I obviously would not to Internet), then the following to entries
>>will be seen (from upstream):
>>
>>10.0.0.0/8 124 456
>> 123 456 456 456 456 456
>>
>>The following modification of reg-exp should take care of this situation:
>> (_123_([0-9]+_)*(456_)+[0-9]+_)|(_456_([0-9]+_)*(123)+_[0-9]+_)
>>
>>I have to say that now I am stretching my abilities to do reg-exp without
>>testing; still to lazy to try :)
>>
>>Best regards,
>>Alexei
>>
>>-----Original Message-----
>>From: Nathaly Landry [mailto:lnathaly@cisco.com]
>>Sent: Friday, August 29, 2003 11:13 PM
>>To: 'asadovnikov'
>>Subject: RE: regular expression
>>
>>
>>Thank you
>>
>> If you have an as-path that has 123 456 456, one might have more
>>pressing issues than worrying about reg exp!! ;-)
>>
>>nat
>>
>>-----Original Message-----
>>From: nobody@groupstudy.com [mailto:nobody@groupstudy.com] On Behalf Of
>>asadovnikov
>>Sent: Friday, August 29, 2003 10:24 PM
>>To: 'Cristian Henry H'; 'Nathaly Landry'
>>Cc: 'Chepuri Roshan'; 'Ram Shummoogum'; ccielab@groupstudy.com
>>Subject: RE: regular expression
>>
>>
>>I am a little to lazy right now to try it but I think the following will
>>work:
>> (_123_([0-9]+_)*456_[0-9]+_)|(_456_([0-9]+_)*123_[0-9]+_)
>>
>>([0-9]+_)* - in the middle will match zero and more AS numbers between
>>123 & 456, and
>>[0-9]+_ - at the end will ensure that the 123/456 is not the last AS
>>number
>> (it would match though 123 456 456, which is only
>>limitation of this
>> reg-exp)
>>
>>-----Original Message-----
>>From: nobody@groupstudy.com [mailto:nobody@groupstudy.com]On Behalf Of
>>Cristian Henry H
>>Sent: Thursday, August 28, 2003 9:36 AM
>>To: Nathaly Landry
>>Cc: 'Chepuri Roshan'; 'Ram Shummoogum'; ccielab@groupstudy.com
>>Subject: Re: regular expression
>>
>>
>>My opinion
>>
>>^([1-9]+_)*(123|456)_([1-9]+_)*(123|456)_([1-9]+_)*$
>>
>>Nathaly Landry ha escrito:
>>>
>>> Cleaning up my folder, did not see an answer for that one, I
>>> think that the reg expression is: Reg exp to only accept routes that
>>> have transitted thru AS 123 AND AS 456
>>>
>>> ^((.+_)*123(_.+)*_456(_.+)*)$|((.+_)*123(_.+)*_456(_.+)*$)
>>>
>>> Any idea?
>>> Nat
>>>
>>> -----Original Message-----
>>> From: nobody@groupstudy.com [mailto:nobody@groupstudy.com] On Behalf
>>> Of Chepuri Roshan
>>> Sent: Thursday, February 20, 2003 11:55 PM
>>> To: Ram Shummoogum
>>> Cc: ccielab@groupstudy.com
>>> Subject: Re:
>>>
>>> Try _[1,4][2,5][3,6]_
>>>
>>> At 10:34 PM 2/20/2003 -0500, Ram Shummoogum wrote:
>>> >Hi ALL:
>>> >
>>> >
>>> >I need some help on this BGP regular expression.
>>> >
>>> >
>>> >Make a router only accept routes that has transit AS 123 and AS 456.
>>
>>> >The keyword here is "and" and not or.
>>> >
>>> >
>>> >Ex: {34 5 6 456 7 99 123 88}
>>> > {45 123 89 456 7}
>>> >
>>> >
>>> >
>>> >
>>> >
>>> >I know "OR" is | but what is AND.
>>> >
>>> >
>>> >
>>> >
>>> >
>>> >Thanks for your help
>>> >
>>> >
>>> >RAM
>>>
>>> ______________________________________________________________________
>>> _
>>> You are subscribed to the GroupStudy.com CCIE R&S Discussion Group.
>>>
>>> Subscription information may be found at:
>>> http://www.groupstudy.com/list/CCIELab.html
>>
>>--
>>Cristian E. Henry
>>REUNA
>>
>>E-mail: chenry@reuna.cl
>>Fono: 56-2-3370336
>>
>>
>>_______________________________________________________________________
>>You are subscribed to the GroupStudy.com CCIE R&S Discussion Group.
>>
>>Subscription information may be found at:
>>http://www.groupstudy.com/list/CCIELab.html
>>
>>
>>_______________________________________________________________________
>>You are subscribed to the GroupStudy.com CCIE R&S Discussion Group.
>>
>>Subscription information may be found at:
>>http://www.groupstudy.com/list/CCIELab.html
>>
>>
>>_______________________________________________________________________
>>You are subscribed to the GroupStudy.com CCIE R&S Discussion Group.
>>
>>Subscription information may be found at:
>>http://www.groupstudy.com/list/CCIELab.html
>>
>>
>>_______________________________________________________________________
>>You are subscribed to the GroupStudy.com CCIE R&S Discussion Group.
>>
>>Subscription information may be found at:
>>http://www.groupstudy.com/list/CCIELab.html
>
>
>_______________________________________________________________________
>You are subscribed to the GroupStudy.com CCIE R&S Discussion Group.
>
>Subscription information may be found at:
>http://www.groupstudy.com/list/CCIELab.html
This archive was generated by hypermail 2.1.4 : Wed Oct 01 2003 - 07:24:22 GMT-3