Public IP address vs private IP address

In this video we will discuss the differene between, public IP address and private IP address and more importantly why do we need 2 IP addresses.

Public and Private IP addresses

We need both private and public IP addresses to connect and do anything on the internet. For example, when you fireup your favourite browser and navigate to, how does the internet know it has to deliver the content to your laptop and not to someone else laptop or phone in your office or home. Well, this is made possible by public and private IP addresses working together.

For example, let's say in your home you have 2 computers and 3 mobile phones, all devices connected to the same network.

public ip address vs private ip address

The router which you use to connect to the internet, assigns a private ip address to each device on your home network (in our example for the 2 computers and 3 mobile phones).

The router itself, gets a public ip address assigned to it from the internet service provider (like BT: British Telecom or Virgin Media if you are in the UK, or Comcast if you are in the US). If you are in a different country, you may have different internet service providers. The importnant point to keep in mind is, it is this internet service provider that assigns a public ip address to your router and it is the router that assigns private ip addresses to all the devices on your home or office network.

  1. With this setup, let's say from one of our computers, we request an article from a website like on the internet. 
  2. The internet knows, your router public ip address. So, it sends the response from to your router.
  3. Your router knows, the private ip address of each of your devices. So, the router then forwards the response to that respective device.

In our example, we have 5 devices (2 computers and 3 mobile phones). So, all the 5 devices have the same public ip addresss, but a unique and different private ip address. This is how the router is able to send the response it received from the internet to the device that made the request.

IP addresses - terminology

There are different terms that people use interchangably to refer to Private and Public IP addresses.

Private IP Public IP
Internal IP External IP
LAN (Local Area Network) IP
WAN (Wide Area Network) IP

How to find private ip address

In the run window, type cmd and click OK

open command prompt on windows 10

In the command prompt type the following command and press enter


In the output, you should see IPv4. This is your private ip address

How to find public ip address

  1. On your laptop fire up the command prompt and use the command ipconfig
  2. Find the default gateway IP address 
  3. Type the default gateway IP address in the browser (
  4. This takes you to the admin router page and you should see the WAN IP address here.
  5. WAN IP address is your public ip address. WAN IP is just another term for public IP


Simply navigate to the following website and it displays your WAN IP address.

Public and Private IP address - Important points to remember

Public IP address

  1. Public IP address is also commonly called as internet IP addresss.
  2. It is by this public IP address your computer is indetified on the internet.
  3. If you connect to the internet from an airport or hotel your public IP address changes.

Private IP address

  1. Private IP address is private to your home or office network. 
  2. The internet or the external world does not know about it. 
  3. Private IP addresses are generated by your internet router.

Azure tutorial for beginners

© 2020 Pragimtech. All Rights Reserved.