Link to home
Start Free TrialLog in
Avatar of romanm
romanm

asked on

search ip's near me

Hi,
how do I find IP's that are near me?
I mean IP's that I can reach with minimal hops.

cheers
-roman
Avatar of chicagoan
chicagoan
Flag of United States of America image

IP addresses aren't (strictly speaking) geographic. ISP's route traffic the cheapest way by 'peering' with other ISP's. You reach your ISP via a telco connection to the main office and then to the ISP network or through a direct fiber connection if you're lucky enough to be in a building that's connected. At home you're going through the telephone company (on dialup, ISDN or DSL) or though your cable company. You'll just have to use traceroute (tracert my.destination.com in windows) to see the path your ISP takes to reach others. Hops aren't only metric you need to look at, latency and dropped packets can make a 'shorter' route pretty miserable.
Avatar of Flash828
Flash828

Well, for one, IP's on the same subnet as you will be near you.  So you have have an IP address (this is an example), of 192.168.1.13, and your subnet mask is 255.255.255.0, then all the IP's in the range 192.168.1.1 - 192.168.1.254 are geographically very close to you.  Note that in this example I used the private address space for a Class C address.  This will likely not be the case for you (if it is then people are REAL close to you ont his network.. as in next door).

Second of all, one hop will mean that all traffic behind your gateway, which will be the same as what I wrote above.  If you are looking for two hops, you just increased your geographic region by anywhere from a block to a city, depending on where you are, who and who your ISP is.

If you REALLY want to know, then start collecting information about your friends using other ISPs.  Get their network numbers (eg in the example above, your network would be 192.168.1.0 because the subnet mask was 255.255.255.0).  Since the numbers they provide you will all be within their respective gateways, this information along with their subnet masks, will tell you who is on the same network, and thus who is as close as that friend.  Of course this is very relative.  If people are using dialup, then this is even less accurate.  If people are on cable modem's this information is very accurate, as it represents people on the same Node (a node is similar to a router, except its on a telephone pole near you).

If you get more specific as to what kind of geographic range then let me know.
Run a tracert on the IP or hostname to find the hops.

eg from a command prompt on NT/W2k/XP use:
   tracert www.google.com 
or tracert 10.0.0.1

If you want to find hosts that you don't know about then you can use several methods.

Run a scan of a range of IP addresses, this usually automates the process of performing some type of ping and lists the hosts that respond.

Run a sniffer on your PC, this will decode ethernet traffic and allow you to 'see' whats going down the wire.

Have a look at (expensive) apps like Network Instruments Observer or Eeye's Iris to get an idea of whats possible in software.

If you've really got money to burn a hardware network probe will help.
Avatar of Les Moore
You will only be able to find IP addresses with a scanner or sniffer on your own network, not across public routers.

Can you be more specific on what you are trying to do?
Avatar of romanm

ASKER

let me try and refine my question,
I want to find the ip's that are near me, outside of my subnet!
BUT:
I want to do it inside my c++ pure win32 api application.
I want the application to run and print me:

ip xxx.xxx.xxx.xxx is N hops from localhost
ip xxx.xxx.xxx.xxx is N hops from localhost
ip xxx.xxx.xxx.xxx is N+1 hops from localhost
ip xxx.xxx.xxx.xxx is N+2 hops from localhost
ip xxx.xxx.xxx.xxx is N+15000 hops from localhost

Ummmm...........

I duno.

I think you might want to post that in the Programming topic, you would be more likely to get an answer for it.

I definitely have no clue how to do this.
Haha... thats a completely different question.
Unless you can read the routing table at the next hop, you'll not be able to find out what subnets are connected to it. You simply can't do that with a program on your own network. Most of the routers are locked down with good security so you won't be able to do that. Just think what a nifty tool this would be for all the hackers out there in the world.

ASKER CERTIFIED SOLUTION
Avatar of Flash828
Flash828

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
romanm:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.