Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. And see here for current known issues.

New Member

Regular Expression

Hi,

I need to filter any routes that have either originated or traversed through AS100.Which of the following method is correct ?

ip as-path access-list 1 deny _100_

OR do i need two statements

ip as-path access-list 1 deny _100_

ip as-path access-list 1 deny ^100_

Thanks for your help

IQ

2 REPLIES

Re: Regular Expression

_100_ will match only those routes which traversed through AS 100. You should use ^100$ for those routes which originated from AS 100.

You will need multiple lines for matching both originated routes as well as those traversed through AS 100.

Bronze

Re: Regular Expression

_100_ will actually accomplish both. _100_ will match routes that include AS number 100 anywhere in the AS_PATH. ^100$ would match routes that only had AS number 100 in the AS_PATH (and only one instance of it). The correct expression for all routes originating from AS 100 would be ^100_.

~Zach

241
Views
0
Helpful
2
Replies
CreatePlease to create content