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

How to do a BGP as-path ACL that only allows partial & default routes?

My ISP's ASN is 7018.

Is following the correct syntax?

^7018_?[0-9]*$

If so, how the heck do I get the "?" in there?

The 7200 tells me:

"Router(config)#ip as-path access-list 1 permit ?

LINE A regular-expression to match BGP AS paths. Use "ctrl-v ?" to enter "?"

When I do ctrl-v ? though, it gives me "^_" instead of "?".

Anyone have any idea?

3 REPLIES
Hall of Fame Super Silver

Re: How to do a BGP as-path ACL that only allows partial & defau

Hello Huang,

if you want to match BGP paths originated in AS 7018 you can use

^7018$

if you want match AS paths of AS length 2 with first AS 7018 you can use

^7018_[0-9]+$

I would use a two lines as path ACL is a good tradeoff between complexity and your needs

I know that first digit cannot be zero so a match for first digit would be [1-9] but also there can be no additional digits

Hope to help

Giuseppe

Hall of Fame Super Bronze

Re: How to do a BGP as-path ACL that only allows partial & defau

Hit CTRL-V then enter ? and continue typing the next text.

Rack1R1(config)#ip as-path access-list 1 permit ? ?

LINE

HTH,

__

Edison.

New Member

Re: How to do a BGP as-path ACL that only allows partial & defau

Very helpful, Thanks guys

282
Views
4
Helpful
3
Replies
CreatePlease login to create content