By now, you know that every device connected to a network needs an IP address. But here's something that often surprises beginners.
Not all IP addresses are meant to be seen on the Internet.
Some are designed for public use, while others are reserved for private networks.
Understanding the difference is essential because it explains how billions of devices can connect to the Internet without each one needing its own public IP address.
Let's look at both.
Public IP Addresses
A public IP address is an address that is reachable over the Internet.
Think of it as the street address of your house.
Anyone who knows your address can send you a letter.
Similarly, servers and websites use public IP addresses so devices around the world can find and communicate with them.
For example, when you visit:
- google.com
- microsoft.com
- github.com
your computer eventually communicates with servers that have public IP addresses.
These addresses are globally unique, meaning no two devices on the public Internet can have the same public IP address at the same time.
Public IP addresses are assigned by your Internet Service Provider (ISP), such as MTN, Airtel, Spectranet, or Starlink.
Private IP Addresses
Most of the devices you own don't communicate directly with the Internet.
Instead, they communicate within your home or office network first.
These devices use private IP addresses.
Private IP addresses can only be used inside private networks.
They are not routable on the public Internet, which means Internet routers ignore them.
Some common examples include:
192.168.1.15
192.168.0.25
10.0.0.5
172.16.5.10
These addresses come from ranges reserved specifically for private networking.
| Private Address Range | CIDR Block |
|---|---|
| 10.0.0.0 โ 10.255.255.255 | 10.0.0.0/8 |
| 172.16.0.0 โ 172.31.255.255 | 172.16.0.0/12 |
| 192.168.0.0 โ 192.168.255.255 | 192.168.0.0/16 |
You may have noticed one of these addresses when running:
Windows
ipconfig
Linux
ip addr
or
ip a
If you're connected to your home Wi-Fi, there's a good chance your computer has an address beginning with 192.168.
Why Don't We Give Every Device a Public IP Address?
Imagine a family of five.
Each person owns:
- a laptop
- a smartphone
- a tablet
- a smart TV
That's already 20 Internet-connected devices in one household.
Now multiply that by millions of homes around the world.
The Internet would have run out of IPv4 addresses much faster.
Instead, most homes receive one public IP address from their ISP.
Every device inside the home uses private IP addresses.
So how do all those devices share a single public IP address?
The answer is Network Address Translation, commonly known as NAT
What Is NAT?
Imagine an office building.
Every employee has a different extension number.
Sarah is extension 101.
John is extension 102.
David is extension 103.
If someone outside the company wants to call one of them, they don't dial each extension directly.
Instead, they call the company's main phone number.
The receptionist receives the call and forwards it to the correct employee.
NAT works in much the same way.
Your home router acts like the receptionist.
Inside your network, every device has its own private IP address.
When one of those devices wants to access the Internet, the router replaces the private IP address with its own public IP address before sending the request.
When the response comes back, the router remembers which device made the request and forwards the data to the correct computer, phone, or tablet.
From the Internet's perspective, every request appears to come from a single public IP address.
Behind the scenes, NAT keeps track of which internal device started each conversation.
Without NAT, every Internet-connected device would require its own public IPv4 address.
NAT became one of the most important technologies for extending the life of IPv4, allowing billions of devices to share a much smaller pool of public addresses.
It also provides an additional layer of privacy because devices using private IP addresses are not directly accessible from the public Internet.
In the next section, we'll look at the long-term solution to IPv4 exhaustion: IPv6, the next generation of Internet addressing.
IPv6 solved the address shortage by introducing a much larger address space. But whether you're working with IPv4 or IPv6, networks still need to be organized efficiently. That's where subnet masks and CIDR notation come in

Top comments (1)