Route View Script (20 of 30)

I created a script that logs into route servers ( I used the ones found here routeserver) and checks for networks that you define. All you have to do is define the networks with edge ASN, this way it can tell you which last hop ASN it took from that route server, and you can match that to your peer’s ASN.

There is basically two files, the configs file, which comes pre-populated with the route servers from the server above, and the script itself named In the script you have to set the directory, it’s variable is $dir. Also, ensure that is executable and that the user can write files to the output directory, as the script will output to files dated and time-stamped.

In the example I am checking for apple networks shown below, I added the route since there is issues with some devices that do not allow to turn the pager off. I had similar issues with JUNOS servers, I only found 1 that would let me set the pager.


The config template for devices is comma seperated with the following fields:

Type (either Cisco-Telnet or JUNOS-Telnet for now)
COL1 – username if one
COL2 – password if one
COL3 – device
COL4 – location
COL5 – ISP Info

Cisco-Telnet,rserv,rserv,,Canada/Montreal,Allstream - East

The output will show you each carrier’s ASN path per network, and then show the last hop ASN per network. route-view


This is a good first step for what I was looking for, but next step would be to to verify against previous run, and then alert against it. You can find the code on my github.

Leave a Comment

NOTE - You can use these HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>