Tools for looking at Route views BGP data

asnarc

Asnarc takes a text dump of BGP data from a standard Cisco router, parses it, and gives a report of the interconnections between ASNs (upstream and downstream peers). This utility was specifically developed for looking at the dumps archived with the Route Views project.

The source can be checked out using:

   svn co http://splunge.cs.uoregon.edu/public/src/asnarc
or you can browse it by clicking on the underlined address in a web browser.

It is a Perl utility. Run asnarc --man for instructions.

Loading Zebra dumps into PostgreSQL

The route views 2 project uses MRT (Zebra) format dumps. This utility can be used to load these dumps into a PostgreSQL database for complex analysis using SQL.

NOTE: This source code has been pretty well-tested, but it has a few dependencies that you must tinker with before it will do anything for you, and you must still do the thinking when it comes to how you want to structure your queries. If you are interested in using this, here are the basic steps:

  1. READ: ANALYSIS.html in my source repository.
  2. Install PostgreSQL.
  3. Install Perl, and the modules Carp::Assert, DBI, and DBD::Pg.
  4. Create a database using the schema shown in ANALYSIS.html.
  5. Obtain the binary zebra dumps of the data in which you are interested.
  6. Run route_btoa on the data to turn it into an ASCII format. This is a utility that you can get from the Zebra folks.
  7. Run my utility (load_update.pl) to load the data. You can run more than one instance of the utility to load more than one file at a time. If you are not I/O bound, and have more than one CPU, this can improve your loading times, otherwise it will hurt you.
The basic idea is that you can load a full dump to use as a base reference point, then load a bunch of updates that tell about the changes to the routing over time. A general query would involve first selecting the records from the full dump, followed by "rolling forward" to the time you are interested in.

The source can be checked out using:

   svn co http://splunge.cs.uoregon.edu/public/src/rview
or you can browse it by clicking on the underlined address in a web browser. You only need load_update.pl and ANALYSIS.html. The other files are things that I have played with, but are not dependencies.