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

Unanswered Question
Dec 19th, 2008
User Badges:

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?

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 4 (1 ratings)
Loading.
Giuseppe Larosa Fri, 12/19/2008 - 11:47
User Badges:
  • Super Silver, 17500 points or more
  • Hall of Fame,

    Founding Member

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
User Badges:
  • Super Bronze, 10000 points or more
  • Hall of Fame,

    Founding Member

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


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

LINE


HTH,


__


Edison.

sdoremus33 Fri, 12/19/2008 - 17:47
User Badges:
  • Bronze, 100 points or more

Very helpful, Thanks guys

Actions

This Discussion