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

Unanswered Question
Dec 19th, 2008

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?

I have this problem too.
0 votes
  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 4 (1 ratings)
Loading.
Giuseppe Larosa Fri, 12/19/2008 - 11:47

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

Edison Ortiz Fri, 12/19/2008 - 13:36

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

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

LINE

HTH,

__

Edison.

Actions

This Discussion