Regexp to filter all private ASNs

Answered Question
Feb 22nd, 2008
User Badges:

Hello everybody,


I want to filter all prefixes that have private ASNs in their AS path and I want to achive this via an ip as-path access-list. (neighbor x.x.x.x remove-private-as isn't an option)


What would a regexp have to look like that filters all ASNs from 64512-65535 ?


Regards,


Dirk


Correct Answer by shivlu jain about 9 years 2 months ago

Dirik


I think this can solve your problem.



ip as-path access-list 1 permit (_64[6-9][0-9][0-9]_|_65[0-9][0-9][0-9]_)



regards

shivlu

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 3 (2 ratings)
Loading.
Correct Answer
shivlu jain Sat, 02/23/2008 - 05:22
User Badges:
  • Silver, 250 points or more

Dirik


I think this can solve your problem.



ip as-path access-list 1 permit (_64[6-9][0-9][0-9]_|_65[0-9][0-9][0-9]_)



regards

shivlu

d.wingert Sat, 02/23/2008 - 06:10
User Badges:

Hello Shivlu,


Thank you very much for your reply, it's the right approach - it's just missing the range from 64512-64599.


I found this here:


ip as-path access-list 150 permit _(6451[2-9]|645[2-9][0-9]|64[6-9][0-9][0-9])_

ip as-path access-list 150 permit _(65[0-4][0-9][0-9]|655[0-2][0-9]|6553[0-5])_


on http://www.merit.edu/mail.archives/nanog/2003-01/msg00365.html


Kind regards,


Dirk

shivlu jain Sat, 02/23/2008 - 06:28
User Badges:
  • Silver, 250 points or more

Thanks for sending me the link of good community.



regards

shivlu

Actions

This Discussion