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

how to express bgp as path?

Hi all,

I have something confuse, how to express the scope of the as path in the bgp as path access list ? I just how if you want to filter as 100 you can use ^100$,but if I want to filter from 100 to 234 ,how can I get it ?

Thank You!

Best Regards

Teru Lei

Community Member

Re: how to express bgp as path?

you should be able to specify one that is similar to the following:


using the brackets allows you to specify a range...


Re: how to express bgp as path?

Except that expression, when expanded, only allows a few of the desired address through: those with 1 or 2 as the first digit, 0, 1, 2, or 4 as the second digit, and 0 through 3 as the last digit. So desired addresses will be blocked, such as 105 through 109, 115 through 119, 125 through 129, 135 through 199, etc.

But you can express the desired filter in three lines to get the logical OR of

100 through 199 with ^1[0-9][0-9]$,

200 through 229 with ^2[0-2][0-9]$, and

230 through 234 with ^23[0-4]$.

Good luck and have fun!

Vincent C Jones

CreatePlease to create content