IP to authoritative CIDR webservices
Hi, 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 filtersets. William
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Mon, Dec 14, 2009 at 8:57 PM, William Pitcock <nenolod@systeminplace.net> wrote:
Hi,
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 filtersets.
WHOIS? Alternatively, use the Team Cymru tool to find the AS, then the CIDR Report portal to determine all perfixes originated by the AS in question: http://asn.cymru.com/ http://www.cidr-report.org/ Apologies if you are seeking other magic... - - ferg -----BEGIN PGP SIGNATURE----- Version: PGP Desktop 9.5.3 (Build 5003) wj8DBQFLJxq3q1pz9mNUZTMRArwbAKDDc0cVkSzbFegAR2iaPzyYvE5vGgCdHeZ2 Sq9wnK0xuf9bz4Z+pxprkX8= =a0cv -----END PGP SIGNATURE----- -- "Fergie", a.k.a. Paul Ferguson Engineering Architecture for the Internet fergdawgster(at)gmail.com ferg's tech blog: http://fergdawg.blogspot.com/
Hi, On Mon, 2009-12-14 at 21:12 -0800, Paul Ferguson wrote:
On Mon, Dec 14, 2009 at 8:57 PM, William Pitcock <nenolod@systeminplace.net> wrote:
Hi,
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 filtersets.
WHOIS?
Alternatively, use the Team Cymru tool to find the AS, then the CIDR Report portal to determine all perfixes originated by the AS in question:
Looks like their WHOIS server in verbose mode will do the trick for what I want, as it provides predictable output. Thank you. William
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 12/15/2009 12:18 AM, William Pitcock wrote:
Looks like their WHOIS server in verbose mode will do the trick for what I want, as it provides predictable output. Thank you.
For the record, the prefix you find here will be the prefix our BGP view (from peers around the globe) sees that IP announced as, which is not necessarily the same as the RIR allocated prefix. And you can find full details of all of the access methods for this service here: http://www.team-cymru.org/Services/ip-to-asn.html Please make note of the notice at the top of the page regarding use in software, applications, and devices - if we have advance notice we can make sure we're not going to accidentally block you or your users, but only if you get in touch with us first. :) Thanks, Tim Wilde - -- Tim Wilde, Senior Software Engineer, Team Cymru, Inc. twilde@cymru.com | +1-630-230-5433 | http://www.team-cymru.org/ -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAksnoKMACgkQluRbRini9tg5dACePR1UW3eLF4LTQ3BkWIdy1B/+ E3IAnjTeU5TeJQkEHLKE7c+CceFyVPU+ =FmpZ -----END PGP SIGNATURE-----
On Tue, Dec 15, 2009 at 12:18 AM, William Pitcock <nenolod@systeminplace.net> wrote:
Hi,
On Mon, 2009-12-14 at 21:12 -0800, Paul Ferguson wrote:
On Mon, Dec 14, 2009 at 8:57 PM, William Pitcock <nenolod@systeminplace.net> wrote:
Hi,
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 filtersets.
WHOIS?
Alternatively, use the Team Cymru tool to find the AS, then the CIDR Report portal to determine all perfixes originated by the AS in question:
Looks like their WHOIS server in verbose mode will do the trick for what I want, as it provides predictable output. Thank you.
there's also the lightish weight routeviews DNS zone data: $ host -W 6 -R 10 -t txt 50.35.2.128.asn.routeviews.org 50.35.2.128.asn.routeviews.org descriptive text "9" "128.2.0.0" "16" 128.2.35.50 lives in 128.2.0.0/16 from ASN9 -chris (thanks to joe/joel/dmm and capitan kemp)
Hi William, .-- 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 filtersets.
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 142.231.1.1 Prefix: 142.231.1.0/24 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|1257|TELE2 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: http://bgpmon.net/blog/?p=213 http://bgpmon.net/bgpmonapi.php Cheers, Andree
participants (5)
-
Andree Toonk
-
Christopher Morrow
-
Paul Ferguson
-
Tim Wilde
-
William Pitcock