Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 3370
  • Last Modified:

search ip's near me

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

1 Solution
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.
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, and your subnet mask is, then all the IP's in the range - 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 because the subnet mask was  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

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.
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

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?
romanmAuthor Commented:
let me try and refine my question,
I want to find the ip's that are near me, outside of my subnet!
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


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.

Thats not neccessarily true.  If you are scanning all IP's that have a TTL of 2, then you would find all IPs that exist exactly one hop away from that router.  Either way, this would take for ever.
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 
Post your closing recommendations!  No comment means you don't care.

Featured Post

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now