[j-nsp] AS_PATH regular expression question.

Vladimir S. Blazhkun v.blazhkun at pcs-net.net
Fri Oct 7 14:32:16 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? --------------------||

Yeah.

>> 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.

-- 
Vladimir S. Blazhkun,
Lead IP NCC Specialist, JNCIA #773, OOO "PCS-Moscow",
Work phone: +7 095 7847617.


More information about the juniper-nsp mailing list