Re: IP BGP REGEXP

From: Vincent Tay <vtay.75_at_gmail.com>
Date: Sat, 7 Jan 2012 12:20:02 +0800

Hi,

If i want to match routes originated from 54 and ONLY directly connected
customers for example 10 254 and not 10 254 253, should i use ^54_[0-9]*$
or ^54(_[0-9]+)?$. The solution state the second latter but i search the
terminal services appendix documentation and it is the first latter. Can
you explain the two? Thanks.

Regards.

On Sat, Jan 7, 2012 at 12:08 PM, Vincent Tay <vtay.75_at_gmail.com> wrote:

> Thanks. Got it.
>
>
> On Sat, Jan 7, 2012 at 2:55 AM, Yuri Bank <yuribank_at_gmail.com> wrote:
>
>> Actually, both regular expressions will match routes originated by AS54
>>
>> The important distinction between these two regular expressions is that
>> the first will match *any* AS_PATH_SEQ that starts with AS54. The second
>> regular expression will match any AS_PATH_SEQ that starts with AS54,
>> followed by *one* or *none* additional AS numbers.
>>
>> _ underscore will match space or end of string
>>
>> -Yuri
>>
>>
>> On Fri, Jan 6, 2012 at 5:04 AM, Keller Giacomarro <keller.g_at_gmail.com>wrote:
>>
>>> They are similar, but not the same.
>>>
>>> The first says...
>>> Match from the start of the line
>>> Match 54
>>> Match a space
>>> I don't care about the rest
>>>
>>> The second says...
>>> Match from the start of the line
>>> Match 54
>>> Match a space
>>> Match a number 0 to 9, one or more times (as few characters as needed,
>>> ungreedy)
>>> I don't care about the rest
>>>
>>> The big difference is that the second regex will require that the next AS
>>> must be a normal AS number, 0 to 9. If it is an AS_SET next
>>> (parenthesis),
>>> or a confederacy (squiggly brackets) next, the second regex will not
>>> match
>>> but the first will.
>>>
>>> Also, note that neither regex will match for AS54-originated routes, as
>>> you
>>> a requiring a space after 54.
>>>
>>> When I'm trying to create regexes, http://gskinner.com/RegExr/ is my
>>> best
>>> friend.
>>>
>>> Keller Giacomarro
>>> keller.g_at_gmail.com
>>>
>>>
>>> On Fri, Jan 6, 2012 at 5:42 AM, Vincent Tay <vtay.75_at_gmail.com> wrote:
>>>
>>> > Hi all,
>>> >
>>> > Any differences between the below BGP regexp?
>>> >
>>> > ^54_ and ^54(_[0-9]+)?$ to match originated from AS54 and its directly
>>> > connected customers?
>>> >
>>> >
>>> > Blogs and organic groups at http://www.ccie.net
>>> >
>>> > _______________________________________________________________________
>>> > Subscription information may be found at:
>>> > http://www.groupstudy.com/list/CCIELab.html
>>>
>>>
>>> Blogs and organic groups at http://www.ccie.net
>>>
>>> _______________________________________________________________________
>>> Subscription information may be found at:
>>> http://www.groupstudy.com/list/CCIELab.html

Blogs and organic groups at http://www.ccie.net
Received on Sat Jan 07 2012 - 12:20:02 ART

This archive was generated by hypermail 2.2.0 : Thu Feb 02 2012 - 11:52:51 ART