Why Two Kinds of Addresses?
The internet runs on IPv4, which has only about 4.3 billion possible addresses — far fewer than the number of internet-connected devices in the world. Rather than give every device its own globally unique address (which would be impossible given the shortage), the internet uses a two-tier system: a small number of public addresses that are globally routable, and a much larger pool of private addresses that can be freely reused inside any private network.
The key rule is simple: private IP addresses are never forwarded by internet routers. When a packet with a private destination address reaches an internet router, it is dropped. This means the same private address — say 192.168.1.100 — can exist simultaneously in millions of homes and offices around the world without any conflict, because those addresses never leave the private networks they belong to.
NAT (Network Address Translation) bridges the two worlds. Your router has a single public IP address assigned by your ISP. When a device inside your home sends a packet to the internet, your router replaces the private source address with the public one, forwards the packet, and remembers which internal device sent it. When the reply arrives at the public IP, the router translates it back and delivers it to the correct private device.
The Three Private IP Ranges (RFC 1918)
| Range | CIDR | Total Addresses | Typical Use |
|---|---|---|---|
10.0.0.0 – 10.255.255.255 | 10.0.0.0/8 | 16,777,216 | Large enterprise networks, cloud VPCs, data centers |
172.16.0.0 – 172.31.255.255 | 172.16.0.0/12 | 1,048,576 | Medium-sized corporate networks; Docker default bridge network |
192.168.0.0 – 192.168.255.255 | 192.168.0.0/16 | 65,536 | Home and small office networks (most common) |
RFC 1918 (published in 1996) formally designated these three ranges as private. Any organization can use them internally without registering with any authority and without risk of conflicting with other organizations on the public internet. The 192.168.0.0/16 range is the one most people encounter — it is the default for virtually every consumer router, which typically assigns addresses like 192.168.1.x or 192.168.0.x to home devices.
Public IP Addresses: The Internet-Routable Space
A public IP address is any IPv4 address that is not in a reserved range. Public addresses are globally unique — no two devices on the public internet should have the same public IP at the same time. They are allocated hierarchically: IANA assigns large blocks to the five regional internet registries (ARIN, RIPE NCC, APNIC, LACNIC, AFRINIC), which allocate smaller blocks to ISPs, which assign individual addresses to customers.
Because IPv4 public addresses are exhausted, ISPs often use CGNAT (Carrier-Grade NAT), placing multiple customers behind a single public IP address. This adds a layer of NAT that customers do not control, which can interfere with peer-to-peer applications, VPNs, gaming, and any service that requires inbound connections to a specific public IP.
How NAT Connects Private to Public
When your laptop at 192.168.1.50 connects to a web server at 93.184.216.34, the packet leaves your laptop with source address 192.168.1.50 and destination 93.184.216.34. Your router intercepts it, replaces the source address with your public IP (say 203.0.113.7), assigns a tracking port number, and forwards the packet to the internet.
The web server sees the request coming from 203.0.113.7 and sends its response there. Your router receives the response, looks up the port number in its NAT table, sees that it belongs to the session from 192.168.1.50, swaps the destination address back, and delivers the packet to your laptop. From your laptop's perspective, the connection worked seamlessly. From the web server's perspective, the entire household appears to be one device at one IP address.
How to Find Your Public IP
The simplest way to see your public IP is to visit a site like this one — SpeedTestHQ shows your IP at the top of the speed test. You can also use command-line tools: curl ifconfig.me or curl icanhazip.com from a terminal returns just your public IP address as plain text. Your router's admin interface (typically at 192.168.1.1 or 192.168.0.1) also shows the WAN IP address assigned by your ISP.
How to Find Your Private IP
On Windows, open Command Prompt and run ipconfig — look for the IPv4 address under your active adapter. On macOS or Linux, run ip addr or ifconfig and look for addresses starting with 10., 172.16–31., or 192.168.. On iOS, go to Settings > Wi-Fi, tap the network name, and scroll to the IP Address field. On Android, go to Settings > Network & internet > Wi-Fi > the connected network.
Frequently Asked Questions
What is a private IP address?
A private IP address is an address from one of three RFC 1918 ranges — 10.0.0.0/8, 172.16.0.0/12, or 192.168.0.0/16 — that is not routable on the public internet. Private IPs are used inside homes, offices, and data centers.
What is a public IP address?
A public IP address is any IPv4 address outside the private, loopback, link-local, and other reserved ranges. Public IPs are globally unique and routable across the internet. Your ISP assigns your router a public IP.
Can two devices have the same private IP?
Yes — as long as they are on different private networks. Since private IP ranges are not routed publicly, 192.168.1.100 can exist simultaneously in millions of homes without conflict. Within a single network, however, duplicate IPs cause connectivity problems.
Can two devices have the same public IP?
In practice, yes — through NAT. Many devices behind a home router share one public IP. At the ISP level, CGNAT puts many customers behind a single public IP address simultaneously.
Why does my IP show a different location?
IP geolocation databases map IPs to locations based on registration records, not GPS. Your public IP is assigned to your ISP, and the database may show the ISP's regional hub location rather than your actual address. VPNs and proxies also change the apparent IP location.
What is 192.168.1.1?
192.168.1.1 is the default gateway address used by many home routers — a private IP in the 192.168.0.0/16 range. Typing this address into your browser opens your router's admin interface. Some routers use 192.168.0.1 or 10.0.0.1 instead.