09-23-2014 09:11 PM - edited 03-04-2019 11:49 PM
ip as-path access-list 1 permit _\(65301\)
Hello all. Will the above regexp capture all prefixes originating from confederation peer AS 65301?
If not, what is the correct syntax?
Thanks,
Solved! Go to Solution.
09-25-2014 01:03 AM
Hello ,
yes i did test this , when I test using _\(65301\) or ^\(65301\) or \(65301\) it was only matching prefixes generated by directly connected confederation peer AS ( 65301) .
I understand this happens because escape character (\) is supposed to match special character . and for the matter of fact I also achieved desired results using regular expression 65301\)
HTH
Sunil Bhadauria
09-24-2014 06:00 AM
Hello ,
To match prefixes only originating from concerned confederation you can use below regular prefix :
Ip as-path access-list 1 permit 65301\)$
This will get you desired results .
Regards
Sunil Bhadauria
09-24-2014 03:26 PM
Hello Sunil. Thanks for the response. Did you verify this works? I will verify over the weekend in my lab.
09-25-2014 01:03 AM
Hello ,
yes i did test this , when I test using _\(65301\) or ^\(65301\) or \(65301\) it was only matching prefixes generated by directly connected confederation peer AS ( 65301) .
I understand this happens because escape character (\) is supposed to match special character . and for the matter of fact I also achieved desired results using regular expression 65301\)
HTH
Sunil Bhadauria
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