//
you're reading...
networking, Uncategorized

NTOP: Regenerating AS-list.txt

I’m currently deploying ntop as a monitoring service between our firewall and internet gateway. Ntop comes with the ability to give me a report on what trafic goes to which AS number. However, it does this by using a plain text file, called AS-list.txt, containing a list of prefixes by AS number. The bundled file is very old and I’ve until now had difficulties getting it updated. One mail on the list suggested using the report from cidr-report.org, but I’ve found the data incomplete. I’ve written a small script to generate this data with raw data from RIPE, ARIN and APNIC. I therefore lack information from LACNIC and AfriNic, but that information isn’t important for me. My main interest is mapping European trafic.

You can find the file here: http://agitate.dk/files/whois.route.parser.rb

The file generates a file called AS-list.txt in your current directory. Change the outputfile variable to adjust this.

My sources are the database dumps from RIPE and RADB on APNIC, as well as the origins report from ARIN.

Tell me if you got any problems with the script.

Discussion

8 thoughts on “NTOP: Regenerating AS-list.txt

  1. Hello Allan,
    thanks for your ruby-script, creating an AS-list.txt.

    There is an error message during processing the script:
    gzip: stdin: unexpected end of file

    Nevertheless the AS-list.txt was created after script finished his work.
    So, just as information, which you asked for in this article.

    Stefan

    Posted by Stefan Welte | May 15, 2009, 1:05 pm
  2. Fantastic mate! Thanks for the script worked like a charm. I got the same thing @Stefan got too, but it still works.

    Posted by Mutant | July 20, 2009, 4:28 pm
  3. Does anyone have a copy of the script they can send me? The link in the post is giving a 404.

    Like you I’ve been trying to use the ones from CIDR report and it just isn’t anywhere near comprehensive enough 😦

    Posted by Alex Smith | August 9, 2009, 10:41 am
  4. Ah, sorry about that. I just moved my domain to a new server. It should be working now again.

    Posted by eising | August 10, 2009, 5:38 am
  5. Would it not make more sense, to grab the ASN data from your router, as you have a list of routes and what actually is announced on the internet today ?

    Posted by Marlow | March 13, 2010, 12:54 pm
    • Sure, you are absolutely right, that would be the easiest option, however at the time of writing I did not have a router with a full feed handy, and I was using ntop to plan our BGP strategy before we actually ran it.

      Posted by eising | March 13, 2010, 10:11 pm
  6. Just so you know, the RADB one your using no longer exists on the APNIC servers:

    ftp://ftp.apnic.net/pub/apnic/whois-data/RADB/split/radb.db.route.gz

    I can’t find it’s new location either.

    Posted by Alex Smith | March 15, 2010, 2:11 pm
    • Okay, thank you for letting me know.
      I think I need a very big disclaimer on this blog post for a number of reasons:
      1) I don’t use this script myself any more, and haven’t really done in a long time
      2) Ntop doesn’t need an AS-list.txt file anymore, at all…

      Posted by eising | March 15, 2010, 2:19 pm

Leave a comment