From: Andree Toonk (andree+)
Date: Wed Dec 16 2009 - 16:57:15 EST
.-- My secret spy satellite informs me that at Mon, 14 Dec 2009, William Pitcock wrote:
> Does anyone know of a webservice that converts a given IP into the
> public CIDR range that belongs to? I am developing a tool where IP to
> CIDR conversion based on RIR whois data would be useful for implementing
Earlier this week, BGPmon.net made their webservices API (using SOAP) available
for everyone. There are several functions that you might find useful.
One of the functions available is getIpInfo(), which will return the best match
prefix for an IPv4 or IPv6 address/prefix. This is based on BGP data (so not
IRR data). It will also provide the OriginAS, AS description and country code
for the prefix.
There's also a whois interface that implements this getIpInfo() webservice.
It's similar to rishwois and the Team Cymru IP to AS whois interface.
$ whois -h whois.bgpmon.net 18.104.22.168
Country code: CA
Origin AS: 271
Origin AS Name: BCNET-AS - BCnet
Or for easy parsing :
$ whois -h whois.bgpmon.net " -m 2001::dead:beef"
BGP Prefix|CC|Origin AS| Origin AS Name
2001::/32|unknown|12637|SEEWEB Seeweb Srl
2001::/32|unknown|25525|REASONNET-AS Reasonnet IP Networks B.V. number
2001::/32|unknown|6939|HURRICANE - Hurricane Electric, Inc.
2001::/32|unknown|12859|NL-BIT BIT BV
2001::/32|unknown|21155|ASN-PROSERVE ProServe B.V. Networks
2001::/32|unknown|1741|FUNETAS FUNET autonomous system
2001::/32|unknown|29259|DE-IABG-TELEPORT IABG Teleport, DE
2001::/32|unknown|29432|TREX-AS TREX Tampere Region Exchange Oy
For more information please see: