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 routeserver.pl. In the script you have to set the directory, it’s variable is $dir. Also, ensure that routerserver.pl 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 127.0.0.1 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.
1 2 3 4 5 | #Networks networks,127.0.0.1/32,1111 networks,17.67.192.0/22,714 networks,17.78.179.0/24,714 networks,17.78.187.0/24,714 |
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
1 2 3 | Cisco-Telnet,rserv,rserv,route-server.east.allstream.com,Canada/Montreal,Allstream - East Cisco-Telnet,,,route-server.eastlink.ca,Canada/Halifax,Eastlink JUNOS-Telnet,rviews,Rviews,route-server.opentransit.net,France,OpenTransit |
The output will show you each carrier’s ASN path per network, and then show the last hop ASN per network.
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.
0 Comments.