cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
385
Views
0
Helpful
2
Replies

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 2

thisisshanky
Level 11
Level 11

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

Sankar Nair
UC Solutions Architect
Pacific Northwest | CDW
CCIE Collaboration #17135 Emeritus

_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

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: