Private IP and Public IP. What is the difference?

Tam H. Doan
4 min readOct 27, 2019

Today when preparing for the Computer Network exam, I would like to share some basic things about Private IP and Public IP.

What is an IP address?

An Internet Protocol (IP) address is a numerical label assigned to each device connected to a network that uses the Internet Protocol for communication.

When a computer communicate with each other on the Internet or in a local network, the data will be sent via the IP address of this device. For example, you need an IP address if you want to host a server for your app — clients need to know this IP address if they want to connect to use your app.

IP address are divided into two types: Public and Private.

Public IP

Public IP is a globally routable unicast IP address which provided by the Internet Service Provider (ISP). Public IP can be “seen” and accessed from the Internet.

Like home address that used to receive mails & parcels, each public IP only exists unique on the Internet for the whole world. Most of users do not have control over their public IP, that right belongs to the ISP.

You can find your public IP by searching Google!

Static vs. dynamic

A public IP can be static or dynamic depending on user’s service type. A static address is unchanged and is often used for hosting websites, servers. On the other hand, dynamic address are chosen from a “pool” of available addresses and will be changed each time user connects.

Most of ISP offer dynamic IP address to their users.

Most users don’t need static IP address, but if you want, contact to your ISP to use another network plan.

Private IP

Private IP are address allocated by InterNIC that allow companies and organizations to create their own local network.

There are three private IP address ranges in class A, class B and class C reserved by IANA (the Internet Assigned Numbers Authority).

Address ranges are provided for private IP

Private IP is used to distinguish computers and other devices in a “private network” including home/schools/companies local network. Because of that, devices in this kind of network can communicate with each other.

Router: the middleman

Most web servers or game servers are usually connected directly from the Internet via a public IP. But on home/dormitory network the router keeps public IP to connect to the Internet, computers, smartphones and all devices that “stay behind” this router only use private IP.

The router now acts as a middleman: receive requests from all private IP behind it and forwards to destination public IP (using DNS server), then receive the response from the Internet it forward back to the sender device.

Routers — the “brains” of home networks. Photo by Misha Feshchak.

For example, home network N consists of 10 devices, each of which is assigned a private IP from to Unlike public IP, local network administrator can freely assign private IP (but it must be in the range above). When computer C connects to the router it will be assigned a private IP ADDR, other devices on this local network “see” this computer via ADDR. However, with private IP devices it won’t be able to communicate directly on the Internet, but all data must go through router. Then from the outside, all devices in network N are communicating with the Internet via a single IP address — the public IP of router!

Source: LearnTomato

To allow communicate from the Internet to the local devices via private IP, the router need the support of NAT (Network Address Translation).

Your IP address

You can find your private IP by opening Command Prompt and typing ipconfig. Because most current networks are still using IPv4, the number that appears in the “IPv4 Address” line is your private IP. For example, with home networks most will be or

Private IP class A of the domitary network

Common misunderstandings about Private IP

Many people believe that private IP is the address used for sneaky actions on the Internet, and therefore it cannot be detected. But that’s not true!

Unlike many people think, a private IP is not the same as a private phone number, it’s just an address belonging to a “private network”. In fact, there is no public IP that cannot be “tracked” — because this TCP/IP protocol is designed to be public and transparent!

📝 Save this story in Journal.

👩‍💻 Wake up every Sunday morning to the week’s most noteworthy stories in Tech waiting in your inbox. Read the Noteworthy in Tech newsletter.