The IANA assigns blocks of IP addresses to specific countries Regional Internet Registries. RIRs usually divide those into blocks assigned to specific ISPs. ISPs usually divide those into blocks assigned to specific sub-regions or exchange points (it’s a little fuzzier here, it could be anywhere from a street to a state). The ISP then uses those blocks to assign a specific IP address to a specific residential customer for a specific period of time. An ISP might also assign certain blocks to specific business customers, for larger businesses.
Most of this data – except for the mapping of a specific IP address to residential customers – is public information published by those respective organisations. That residential customer mapping can also be obtained, but usually only through warrants/subpoena or illegal means.
Additionally, third-parties might collect data about the physical location of networks with particular IP addresses. For example the cars Google uses to gather data for Street View also collect data about local WiFi networks. This provides a mapping of GPS position to IP address that’s accurate more or less to the limited range of WiFi. Though generally this is proprietary data kept secret and used for advertising, not publicly-available geolocation services.
Latest Answers