getasn 0.5

nikw at nikw at
Mon Jun 21 16:34:38 UTC 1999

I haven't seen one of these around, so I wrote one.  My comments from the
top of the proggie speak for themselves.


#getasn, version .5, June 1999, by N.Weidenbacher (nikw at
#getasn is available from

#The purpose of this software is to find the originating AS of the route 
#containing a given IP address or hostname, and to do so in a fun and 
#exciting way!  That is, you type "getasn" and you get
#the ASN-CISCO record from the ARIN registry.  Needless to say, this
#software is not well-tested at all.

#This software requires the perl Expect module, obtainable from CPAN
#(, or more specifically, 
#  Expect, in
#turn, requires IO::Stty, available from

#getasn requires an internet connection for three reason.
#1) It may need to do a DNS lookup if you supply a name
#2) It needs to telnet to route-views to get a BGP4 route
#3) It needs to whois to to look up the ASN.

#getasn has only been tested on Solaris 2.7, but it should work pretty well
#on most unixes whose "host" command produces output similar to Solaris's
#"host".  This is a direct result of my lameness.


More information about the NANOG mailing list