View previous topic :: View next topic |
Author |
Message |
Cojack n00b
Joined: 06 Feb 2003 Posts: 32 Location: Seattle, WA USA
|
Posted: Tue May 06, 2003 11:23 pm Post subject: AS Number Lookup |
|
|
I'm trying to find some kind of way to look up an AS number given an IP address. It would be ideal if I didn't have to call out to an external program, but at this point anything is better than nothing. |
|
Back to top |
|
|
steveb Advocate
Joined: 18 Sep 2002 Posts: 4564
|
Posted: Tue May 06, 2003 11:44 pm Post subject: Re: AS Number Lookup |
|
|
Cojack wrote: | I'm trying to find some kind of way to look up an AS number given an IP address. It would be ideal if I didn't have to call out to an external program, but at this point anything is better than nothing. |
i don't know if this is possible without using a external application.
anyway... maybe someone at the zebra mailing list knows a answer.
cheers
SteveB |
|
Back to top |
|
|
Cojack n00b
Joined: 06 Feb 2003 Posts: 32 Location: Seattle, WA USA
|
Posted: Wed May 07, 2003 2:05 am Post subject: |
|
|
Thanks for the reply. As it turns out, I can dig up the AS number for an address by querying WHOIS. I'd looked there before, but never found those values because I was just using the default query (didn't know you could alter the query). By turning on the "all databases" flag, you get a lot more information, which includes the AS number, among other things.
You learn something new every day. |
|
Back to top |
|
|
steveb Advocate
Joined: 18 Sep 2002 Posts: 4564
|
Posted: Wed May 07, 2003 2:10 am Post subject: |
|
|
cool |
|
Back to top |
|
|
fragbert Tux's lil' helper
Joined: 18 Apr 2003 Posts: 75 Location: Dallas, TX
|
Posted: Wed May 07, 2003 8:17 am Post subject: |
|
|
If you're messing with BGP4, you might also be interested in using the free services on telnet://route-views.oregon-ix.net. It can be useful to see how the rest of the internet actually sees your AS. The on-line WWW WHOIS on http://www.arin.net can also be helpful, as can the IRRd entries available on http://www.radb.net (which the ASN is also very likely registered in).
Michael |
|
Back to top |
|
|
Cojack n00b
Joined: 06 Feb 2003 Posts: 32 Location: Seattle, WA USA
|
Posted: Fri May 09, 2003 12:21 am Post subject: |
|
|
Thanks for the replies. I've been working on a project to automatically correlate a hostname/ip with the geographic data provided by these guys:
http://www.caida.org/tools/utilities/netgeo/index.xml
They provide a CGI interface (and a set of java and perl API's) to do a lookup based on hostname, but that takes too long to repeatedly query. Thankfully, they also prodive a flat file with their data, but they index by AS number, hence my looking for a way to discover the AS numbers.
I'm not sure how much faster it'll be to do WHOIS -> ASN -> flat file query, since I've got to hit the network to find the ASN anyways. Something worth exploring, though. Ideally, I'd be able to call a function (or, slightly less ideally, call out to a program) which discovers the ASN directly, without having to download and parse a bunch of text. I noticed that the traceroute program at telnet://route-views.oregon-ix.net provides the AS number in realtime, which leads me to believe they're retrieving the number at a lower level.
I admit that I typically don't delve this low into routing issues, so my knowledge of these things is pretty rude. |
|
Back to top |
|
|
fragbert Tux's lil' helper
Joined: 18 Apr 2003 Posts: 75 Location: Dallas, TX
|
Posted: Sat May 10, 2003 8:12 am Post subject: |
|
|
Cojack wrote: | Thankfully, they also prodive a flat file with their data, but they index by AS number, hence my looking for a way to discover the AS numbers. |
It sounds like you might be able to bulk-insert this into a database, and then perform the queries you need to retrieve the data. If the data is in a decent format, this is probably your best option imo.
Cojack wrote: | I'm not sure how much faster it'll be to do WHOIS -> ASN -> flat file query, since I've got to hit the network to find the ASN anyways. Something worth exploring, though. Ideally, I'd be able to call a function (or, slightly less ideally, call out to a program) which discovers the ASN directly, without having to download and parse a bunch of text. I noticed that the traceroute program at telnet://route-views.oregon-ix.net provides the AS number in realtime, which leads me to believe they're retrieving the number at a lower level. |
Well, route-views is a Cisco router, using IOS to figure out the ASN automagically, so this is probably not an option for you. You might want to look into irrd -- this is what stores all of the major internet routing information (including networks, ASNs, etc). It may be possible to call this program (or use a library) in some way to retrieve the data you need. I've only used the IRR as a client, so I can't say much for how the program is laid out or if it would be a good match for you, but it is an option.
Cojack wrote: | I admit that I typically don't delve this low into routing issues, so my knowledge of these things is pretty rude. |
It sounds like you're doing just fine. BGP4 is actually one of the least complicated routing protocols on the Internet; it just happens to be the one with the most bureaucracy.
Michael |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|