· 4 min read
Public vs private IP addresses
Your phone has at least two IP addresses: one your router gave it, and one the rest of the internet sees. They are different numbers that answer different questions, and mixing them up is the most common source of confusion about IP addresses.
On this page
The difference at a glance#
A public IP address is unique across the whole internet and is how the rest of the world sees your connection. A private IP address is unique only inside one network and is how your router tells your devices apart. Both are real addresses; they simply live in different places.
| Public | Private | |
|---|---|---|
| Assigned by | Your ISP, from a block it received from a regional registry | Your router, usually through DHCP |
| Unique | Across the whole internet | Only inside your own network |
| Reachable from outside | In principle, subject to firewalls | Not directly |
| Where you see it | On this site's home page, or in any lookup | In your device's network settings and your router's admin page |
| Typical example | 203.0.113.42 (a documentation address) | 192.168.1.14 |
| What websites see | This one | Never this one |
The private ranges#
Private addresses are not chosen at random. RFC 1918 reserves three IPv4 blocks that will never be assigned to anyone on the public internet, so any network can use them freely, and millions do, at the same time.
| Range | Addresses | Used for |
|---|---|---|
10.0.0.0/8 | 16,777,216 | Large organisations, some home routers and most cloud networks |
172.16.0.0/12 | 1,048,576 | Mid-size networks; Docker uses part of it by default |
192.168.0.0/16 | 65,536 | Nearly every home router |
100.64.0.0/10 | 4,194,304 | Shared address space for carrier-grade NAT (RFC 6598). Not private in the RFC 1918 sense, and not public either |
169.254.0.0/16 | 65,536 | Link-local: what a device gives itself when DHCP fails |
127.0.0.0/8 | 16,777,216 | Loopback: the device talking to itself, usually 127.0.0.1 |
fc00::/7 | About 2^121 | IPv6 unique local addresses, in practice fd00::/8 |
fe80::/10 | About 2^118 | IPv6 link-local, present on every IPv6 interface |
Anything outside these and the other reserved ranges is a public address.
If you are wondering about the slashes, /8 and /12 are CIDR notation for how many leading bits are fixed. CIDR and subnetting explains it, and the subnet calculator will do the arithmetic.
How a private address reaches the internet#
Private addresses cannot be routed on the internet, so something has to translate them. Your router does, using network address translation: outbound packets get your public address as their sender and a port number that identifies the device, and replies are matched back through that table. What is NAT walks through the table row by row, including what changes when your ISP adds a second layer of it.
How to tell which one you are looking at#
- Starts with `10.`, `192.168.`, or `172.16` to `172.31`: private.
- Starts with `100.64` to `100.127`: shared address space, which means your ISP is doing carrier-grade NAT.
- Starts with `169.254`: your device could not get an address from the router.
- Starts with `127.`: the device itself.
- Anything else, and not on the reserved list: public.
For an address you cannot classify by eye, a lookup reports its scope directly: public, private, loopback, link-local, carrier-grade NAT, multicast or reserved.
Why the distinction matters#
- Privacy. Websites, ad networks and fraud systems see the public address. The private one never leaves your network, so hiding or changing it does nothing for you. A VPN replaces the public one.
- Hosting and remote access. To reach something at home from outside you need the public address, or a dynamic DNS name that follows it, and a router that forwards the port. Behind carrier-grade NAT that is not possible without a tunnel.
- Troubleshooting. "My IP" in a support ticket almost always means the public address. "My IP" in a network setup guide almost always means the private one. Ask which.
- Security scans. Scanning
192.168.1.14from the internet finds nothing, because it does not exist there. Scanning your public address finds whatever your router exposes.
Common questions#
Can a private IP address be traced?
Not from the internet. It appears in no request a website receives. Inside your network it identifies one device, and your router can name it.
Why does my phone show a different IP on Wi-Fi and mobile data?
Because it is on a different network each time: a private address from your router on Wi-Fi, and one from your carrier on mobile data, usually behind carrier-grade NAT. The public address the internet sees differs too.
Do IPv6 addresses have a private/public split?
The idea exists but looks different. Devices normally have a globally routable address, and a router firewall decides what may reach it. Unique local addresses (fd00::/8) play the role of 192.168.x.x for traffic that should stay inside the site.
Try it on your own connection
Sources and further reading
- RFC 1918: Address Allocation for Private Internets
- RFC 6598: IANA-Reserved IPv4 Prefix for Shared Address Space — The 100.64.0.0/10 range used for carrier-grade NAT.
- RFC 4193: Unique Local IPv6 Unicast Addresses
- IANA IPv4 Special-Purpose Address Registry
Keep reading
- Addressing and routingWhat is NAT, and what is CGNAT?NAT lets a whole network share one public IP address. How the translation table works, what carrier-grade NAT changes, and why NAT is not a firewall.
- FundamentalsHow to find your IP address on any deviceStep-by-step ways to find your public and private IP address on Windows, macOS, Linux, Android, iPhone and your router, with the terminal commands for each.
- Addressing and routingStatic vs dynamic IP addressesA dynamic IP is leased and can change; a static IP stays put. How each works, when a static address is worth paying for, and how to tell which one you have.
- FundamentalsThe complete guide to IP addressesOne reference for the whole subject: how addresses are built, the reserved ranges you will meet, how they are allocated and routed, and how to read a lookup result.
Published by My IP Address