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

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

For an introduction to the new site, click here. If you'd prefer to explore, try our test area to get started. And see here for current known issues.

New Member

BGP as-path filter for repeated AS numbers


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.


  • WAN Routing and Switching
Everyone's tags (1)
New Member

ip as-path access-list 10

ip as-path access-list 10 permit ^(600)+

try that

New Member

+ specify one or many options

+ specify one or many options. But can I specify the exact iteration?

New Member

I honestly never seen it.

I honestly never seen it.  Unless someone has some ninja tricks I've never seen.

New Member

ideally the pattern "65022

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.