Understand the differences between CIDR, Private IP, and Public IP Address with real-world examples and AWS use cases. A must-know guide for developers and cloud engineers.

When working with cloud platforms like AWS, Docker, or any distributed system, understanding networking basics is non-negotiable. Three core concepts you’ll encounter everywhere are CIDR, Private IP, and Public IP Address.
Let’s break them down in a simple and practical way.
A Public IP Address is an IP that is exposed to the internet. It is globally unique and assigned by an ISP.
8.8.8.8
142.250.183.206
When you visit a website, your request goes to a server’s public IP.
A Private IP Address is used inside a local or internal network. These IPs are not directly reachable from the internet.
10.0.0.0 – 10.255.255.255
172.16.0.0 – 172.31.255.255
192.168.0.0 – 192.168.255.255
192.168.1.10
10.0.0.5
Devices in your home Wi-Fi or AWS VPC communicate using private IPs.
CIDR (Classless Inter-Domain Routing) is a method to define a range of IP addresses.
IP_ADDRESS / PREFIX
192.168.1.0/24
This means:
The /24 indicates how many bits are reserved for the network.
| CIDR | Total IPs | Usable IPs |
|---|---|---|
| /32 | 1 | 1 |
| /30 | 4 | 2 |
| /24 | 256 | 254 |
| /16 | 65,536 | 65,534 |
| Feature | Public IP | Private IP | CIDR |
|---|---|---|---|
| Scope | Internet | Local Network | Defines IP range |
| Accessibility | Public | Private | Depends on configuration |
| Uniqueness | Global | Local reuse | Not applicable |
| Example | 8.8.8.8 | 192.168.1.1 | 192.168.1.0/24 |
Let’s say you create an AWS setup:
10.0.0.0/1610.0.1.0/2410.0.1.1054.x.x.xThink of it like an apartment:
