What are Public & Private IP Addresses? How To Find Yours?



Basically, as you must be familiar with this fact that an IP address is a combination of the 4 decimal numbers, separated with a dot between them. An IP address is used to identify your device (whether it's your PC, Laptop or your Smartphone). All the gadgets that gets connected to the internet, must have their IP addresses. When these devices communicate with each other, they communicate through their IP addresses. The IP addresses are main source to disguise between two different devices. They are like the identity of your device. As in day-to-day life, we identify the different persons with their names, exactly like that, the computers have IP address as their "name" to get identified by other computers.
Your computer is likely to has public and private IP address. If you are hosting a server software, the client will need your public IP to connect with you. Lets have some more knowledge on Public and Private IP addresses.


Private vs. Public IP Addresses


An IP address can be either Private or Public. Your computer have both of it. Though your computer must not have two IP addresses, but here we assume that we have both IP addresses, as we'll clarify it later in this post. 


Basically, before understanding the difference between Public and Private IP addresses, we need to know our network setup, as it influences the IP address allocation, big time! For example, in a typical home network, all your devices are connected to the home router, and the router is connected to the internet. Thus the devices that you use in home, like your PC, laptop, smartphone, etc. are connected to your router. So, to disguise between them, the router are set up to allocate the different IP address to each of the device that is connected to it. And yeah!, you guessed that right, the routers are considered as a very smart equipment in the whole network setup, without them the Internet is not possible!


So, coming back to the point, the IP address which are allotted by router are called the Private IP of your device. Basically, the private IP addresses are in range of 192.168.x.x - A range of IP addresses exclusively allocated to the Private IP Addresses. Thus, assuming you’re behind a router performing network address translation, your computer has 2 IP addresses that matter. If you are connected to the Internet, you'll have a Public IP too. The Public IP is the IP that is seen by everyone. Anywhere you wander in the internet, you'll leave your Public IP address wherever required. The Private IP addresses, as the name suggest, are kept hidden from the Internet.  


Now, as we mentioned before, here we are gonna clarify the statement that I told "your computer must not have two IP addresses", why? Here is the answer! Earlier in this post, we also mentioned that Routers are very smart devices. Now they are gonna prove why they are considered smart. 


Actually, the router sets up a routing table, which have the information of all the devices(or nodes) that are connected to it. It also have the information of their private IP addresses and Public IP addresses. The technique named NAT(network address translation) is used in router, for the translation between public and private IP addresses.


Thus, if any outside world device calls your device using public IP address, the router is smart enough to translate that Public IP into Private IP address with NAT, and let that outside world device to communicate with it's desired device, which is owned by you.


Thus from a router point of view, your computer can be addressed using Private IP address, whereas, from an Internet point of view, your computer can be addressed using your Public IP address.


How come I know My Private IP Address?


Finding your private IP address is very easy and it done by either by clicking or by typing a simple command in command prompt.


To find the IP address in a few simple clicks, all you need to do is to go to Control Panel and click on "View Network Status", which will open up the "Network and Sharing Centre" which will display your current network setup.







Now click on the network name on the right side of the screen, where the network name is written with a clickable link.
After clicking that, a dialog box will open up. Click on "Details.."


On the next screen, the IP address written in front of IPv4 address, is your Private IP.
If you want to get your IP address using command line, then open up your command prompt and type "ipconfig" without quotes, and you'll be presented with your Private IP address. If you are a beginner, don't concentrate on other info which might confuse you. Just concentrate on highlighted text in the following image.




How Do I Know My Public IP Address?
Just open up your browser and in Google, type "What is my ip", and you'll be presented with your public IP address.


[Footnote : Some reader might notice from the images that I've uploaded, that I have the same public and private IP address. Is that possible? The answer is "YES". It depends on the network topology that you are connected to. As I use 3G USB modem to connect to the Internet, I'll have the same private IP as my public IP.]