03-11-2017 04:18 PM - edited 03-05-2019 08:11 AM
Hello,
I am trying to implement an AS Path filter for repeated AS Numbers without typing a long list.
For example, in the below statement, I have to define the AS Number 65022 6 times using standard BGP regular expresison.
ip as-path access-list 1 permit 65022 65022 65022 65022 65022 65022
Is there anyway the above command can be written efficiently ?. for example instead of typing the AS Number 65022 multiple times, can it be written somethinglike "65022{6}" ? .
Thanks for your support.
Franklin
03-11-2017 04:54 PM
ip as-path access-list 10 permit ^(600)+
try that
03-11-2017 04:58 PM
+ specify one or many options. But can I specify the exact iteration?
03-11-2017 07:28 PM
I honestly never seen it. Unless someone has some ninja tricks I've never seen.
03-12-2017 03:40 AM
ideally the pattern "65022 65022 65022 65022 65022 65022" could've been validated using the following expression..
ip as-path access-list 10 permit (65022 ) {5}
But it didn't work.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide