Re: RE: bgp as-path

From: Donny MATEO (donny.mateo@sg.ca-indosuez.com)
Date: Thu Nov 14 2002 - 22:57:20 GMT-3


interesting, I think both is correct
the way I see it is

^4_[0-9]*$ is saying any string start with 4 folowed by one space and then followed by somthing that
is consisting of number between 0-9 (the number of the occurance doesnt matter. So the following
string will do

<4 >, <4 1>, <4 1231> or even to the extreme <4 123245342423424235436546546456> will still match.
but of course we know the cap of the AS number so that wont happen.

as for your config it is also correct, but the cisco one is shorter.. ;))

Donny

                                                                                                                                       
                      stefan vogt
                      <stefan-uwe_vogt@ To: ccielab@groupstudy.com, "Emmanuel Guilain" <emmanuel.guilain@cgey.com>, "Joe
                      web.de> Martin" <jmartin@capitalpremium.net>
                      Sent by: cc:
                      nobody@groupstudy Subject: Re: RE: bgp as-path
                      .com
                                                                                                                                       
                                                                                                                                       
                      15-11-2002 06:30
                      Please respond to
                      stefan vogt
                                                                                                                                       
                                                                                                                                       

Hi,

Assume this refers to a document on CCO:
http://www.cisco.com/en/US/tech/tk648/tk365/technologies_tech_note09186a0080094a92.shtml

...networks originated from AS 4 and all directly attached ASs of AS 4.

ip as-path access-list 1 permit ^4_[0-9]*$

But my config would be

ip as-path access-list 1 permit ^4(_[0-9]+)?$

+ => 1 or more times
* => 0 or more times
? => 0 or 1 times

Which one is correct? In my opinion in ^4_[0-9]*$ is not correct. If I'm wrong, please correct me.

Thanks,
Stefan-Uwe

"Joe Martin" <jmartin@capitalpremium.net> schrieb am 14.11.02 17:16:14:
> I'll take a shot at it just to see if I understand.
> I believe this is saying accept any route originated in AS 4, regardless of
> any other AS's it has passed through, including none.
>
> Someone help me if I'm wrong.
>
> -----Original Message-----
> From: nobody@groupstudy.com [mailto:nobody@groupstudy.com]On Behalf Of
> Emmanuel Guilain
> Sent: Thursday, November 14, 2002 8:01 AM
> To: ccielab@groupstudy.com
> Subject: Re: bgp as-path
>
>
> ----- Original Message -----
> From: "csc david" <davidcsc2002@yahoo.com.cn>
>
> > ip as-path access-list 1 permit ^4_[0-9]*$
>
> [] represents an item
> * means N occurences of de preceding item
> 0-9 means a digit from 0 to 9
>
> So [0-9]* means N occurences of digit from 0 to 9
>
> Tell me if I'm wrong
>
> Emmanuel



This archive was generated by hypermail 2.1.4 : Tue Dec 03 2002 - 07:23:00 GMT-3