Wednesday, January 18, 2017

Public ip v/s Private ip


Public IP vs Private IP Addresses

 Whenever you connect to the internet using your mobile phones,PCs you are assigned an ip address Unique to your network. Most probably you will be allocated ip address within the following 3 ranges.


Starting address . Ending address . Provider Number of hosts
10.0.0.0 10.255.255.255 Cellular Networks 16,777,216
172.16.0.0 172.31.255.255 Institution or Corporate intranets 1,048,576
192.168.0.0 192.168.255.255 Typical routers at home 65,536

  If your ip is between above ranges (and probably will 😉 ) you are having private ip address.When a computer is assigned a private IP address, the local devices sees this computer via it's private IP address. However, the devices residing outside of your local network cannot directly communicate via the private IP address.

 These addresses are also called as non-routable as these are unique in a single network. This is also the reason you cannot access website hosted on your devices from the internet.

With the use of private ip address we can have more devices connected to the internet than the total ip addresses available.

Then what are Public IP addresses?

   Addresses excluding above ranges are public ip addresses. Public ip addresses are globally unique.
A public ip address can be accessed over the internet. Web servers, mail servers and all the websites hosted on the internet have public ip address. You can find your public ip by Googling "what is my ip".

  With the shift to IPv6, there would be no term called as private ip address. Each device will receive a globally unique IPv6 address as there are about 3.6 x 10^38 addresses available.