Finding ASN from IP address

I want to create a mapping of IP addresses to ASN, for a specific like
of IP addresses. Eg:
  1.2.3.4
  12.34.56.78

etc, gathered from my system logs.

What is the best way of doing this?

I thought about something along the lines of:
  install routing software (zebra?)
  pass software the IP's, get it to spit back a string from which I can
    grab the ASN

Two problems being I don't know which software to install that can do
that, or where to get a copy of the current routing table, so that I can
feed that to the software.

Suggestions appreciated.

Team Cymru is offering a IP to ASN Whois service:

Well, if you are not adverse to using a pre-existing tool, the Team CYMRU
folks have been kind enough to provide a server that does just that.

whois -h whois.cymru.com 66.119.192.4
ASN | IP | Name
16713 | 66.119.192.4 | NOANET-WA Northwest Open Acces

Mike

Avleen Vig writes on 10/9/2003 10:19 PM:

I want to create a mapping of IP addresses to ASN, for a specific like
of IP addresses. Eg:
  1.2.3.4
  12.34.56.78

etc, gathered from my system logs.

What is the best way of doing this?

Rob Thomas (cymru.com) has something like this - see below.

There's a paper on just this problem from SIGCOMM 2003:

http://www.acm.org/sigcomm/sigcomm2003/papers.html#p365-mao

http://www.spamshield.org/#tools : ip-leecher.pl

And damn you, if you don't use your own router instead of the
route-servers for more than a few 100 queries per day :slight_smile:

bye,Kai

Avleen,

I want to create a mapping of IP addresses to ASN, for a specific like
of IP addresses. Eg:
  1.2.3.4
  12.34.56.78

etc, gathered from my system logs.

What is the best way of doing this?

I thought about something along the lines of:
  install routing software (zebra?)
  pass software the IP's, get it to spit back a string from which I can
    grab the ASN

Starting from the routing table is indeed the best approach. We recently
studied this problem and found that an approach based on whois queries to
an IRR only returns the correct result in ~80% of the cases, whereas using
routing tables returns the correct result in ~99% of the cases. See:

for more details. We're expanding the software used for this study into a
public service right now and hope to announce this to the public shortly.

Henk