03-11-2008 01:47 PM - edited 03-03-2019 09:05 PM
If I have the following AS Path access list:
ip as-path access-list 100 permit ^1234_[0-9]*$
Will this match all AS's with a path through AS 1234, or just AS's adjacent to AS 1234?
Solved! Go to Solution.
03-12-2008 12:46 AM
HI Johnny, [Pls Rate if HELPS]
ip as-path access-list 100 permit ^1234_[0-9]*$
The above As-Path List will match the AS's only adjacent to AS1234.
To match more AS's with a path through AS 1234 means, Configure as below:
ip as-path access-list 100 permit ^1234_[0-9]*_[0-9]*_[0-9]*$
Hope i am Informative.
Pls Rate if HELPS
Best Regards,
Guru Prasad R
03-11-2008 08:14 PM
Hi,
This means to match any network originated from AS1234 and directly attached to AS1234.
Regards,
Dandy
03-11-2008 08:24 PM
Hmmm...so how would I match only the AS's adjacent to AS 1234?
03-12-2008 12:46 AM
HI Johnny, [Pls Rate if HELPS]
ip as-path access-list 100 permit ^1234_[0-9]*$
The above As-Path List will match the AS's only adjacent to AS1234.
To match more AS's with a path through AS 1234 means, Configure as below:
ip as-path access-list 100 permit ^1234_[0-9]*_[0-9]*_[0-9]*$
Hope i am Informative.
Pls Rate if HELPS
Best Regards,
Guru Prasad R
03-12-2008 04:51 AM
John
I think we should be clear about Dandy's answer and what he meant about originate. If he meant originate in terms of this is the neighbor that passed the update to you then his explanation is correct that the regular expression would identify your neighbor AS and ASes directly connected to that AS. If he meant originate in the sense of the AS where the prefix is actually located then he got it backward. To identify the AS where the prefix is actually located the1234 would be next to the $ and not next to the ^.
HTH
Rick
03-12-2008 08:45 PM
I just tried this out in a lab, and you are correct.
03-12-2008 05:03 AM
Hi,
To match all prefixes received through AS 1234 irrespective of originating AS and path length use
ip as-path access-list 101 permit ^1234_
As already mentioned by the other posts the given AS Path ACL will match pathes received through 1234 and with a total path length of two ASes.
As a short reminder, an AS Path ACL with regular expressions treats the AS path as a text string with:
^ denotes begin of string
$ denotes end of string
_ denotes a delimiter like a space
* denotes one or more
Hope this helps! Please use the rating system.
Regards, Martin
03-12-2008 08:48 PM
You are absolutely correct
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