[j-nsp] AS_PATH regular expression question.

Kevin Oberman oberman at es.net
Fri Oct 7 13:56:48 EDT 2005


> Date: Fri, 7 Oct 2005 21:05:43 +0400 (MSD)
> From: "Vladimir S. Blazhkun" <v.blazhkun at pcs-net.net>
> Sender: juniper-nsp-bounces at puck.nether.net
> 
> 
> True or False: The regular expression of: 64512 .+ matches an AS path of
> 64521 64567 65000?                           ^^
     ^^----Confusing typo? --------------------||
> 
> Theory ( JNCIS study guide by Joseph M. Soricelli ) says: false.
> 
> Practice ( my Juniper M5 based network ) says: true.
> 
> test at lab> show route aspath-regex "64512 .+" terse
> Restart Complete
> + = Active Route, - = Last Active, * = Both
> 
> A Destination        P Prf   Metric 1   Metric 2  Next hop        AS path
>    3.0.0.0/8          B 170        100        210 >10.186.0.125   64512 702 703 80 I
>    6.5.0.0/19         B 170        100        210 >10.186.0.125   64512 702 702 702 702 I
> 
> As you see it matches AS_PATH "64512 702 703 80", and not only "64512 702 702 702 702".
> 
> What is the right answer you think?

Reality wins every time. 64512 will match any AS path where the first AS
in the path is 64512 and there is at least one additional AS in the
path. The number of additional ASes in the path is not restricted.
-- 
R. Kevin Oberman, Network Engineer
Energy Sciences Network (ESnet)
Ernest O. Lawrence Berkeley National Laboratory (Berkeley Lab)
E-mail: oberman at es.net			Phone: +1 510 486-8634


More information about the juniper-nsp mailing list