Sometimes I get amused how can someone get country’s name from IP-Address. If someone gets this info where does it store.
First, if you have any IP-Address it will look like this:
For example: 184.108.40.206 (if we are talking about IPv4 protocol).
Internet Assigned Numbers Authority (IANA) Manages IP-Addresses
The Internet Assigned Numbers Authority (IANA), is a non-profit organization which manages IP address distribution with the help of five RIRs (Regional Internet Registries) namely:
- African Network Information Center (AFRINIC) for Africa
- American Registry for Internet Numbers (ARIN) for the United States, Canada, several parts of the Caribbean region, and Antarctica.
- Asia-Pacific Network Information Centre (APNIC) for Asia, Australia, New Zealand, and neighboring countries
- Latin America and Caribbean Network Information Centre (LACNIC) for Latin America and parts of the Caribbean region
- Réseaux IP Européens Network Coordination Centre (RIPE NCC) for Europe, Russia, the Middle East, and Central Asia
These are also a non-profit organization which manages the distribution of IP address in their region and stores the data related to IP-address.
Now they sell the range of IP-address to the POC. Then these POC update the database of the respective RIRs.
That is how this large database is managed.
If we talk about Country’s Info regarding the IP address. RIRs save details of IP ranges assigned to the country.
In the below-mentioned link, you will get the Info what range of IP address assigned to which RIRs
List of Url to find IP-Address
List of IP address assigned by
APNIC to the country found in the below-mentioned link:
ARIN to the country found in the below-mentioned link:
AFRINIC to the country found in the below-mentioned link:
LACNIC to the country found in below-mentioned link:
To get the range of IP address assigned to the country
You will need to convert your IP address to IP number
- The process to convert your IP address 192.168.1.2 to IP number are as follows:
192 x (256) ^ 3 + 168 x (256) ^ 2 + 1 x (256)^1 + 2 (256)^ 0 = ? 3221225472 + 11010048 + 256 + 2 = 3232235778
- If you want to convert IP number to IP address is as follows:
[3232235778/256^3] % 256 = 192
[3232235778/256^2] % 256 = 168
[3232235778/256^1] % 256 = 1
[3232235778/256^0] % 256 = 0