Public vs private IP addresses
Your laptop has one address on your home network and shares a completely different one with the rest of the house when it talks to the internet. This guide explains which is which, the three private ranges every network uses, how the router translates between them, and the special addresses that are neither.
In this guide
A public IP address is unique on the internet and is assigned to your connection by your provider; every website sees it. A private IP address is only valid inside a local network and comes from three ranges reserved by RFC 1918: 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16. Your router gives private addresses to your devices and uses network address translation (NAT) to let them all share its one public address. 192.168.1.1 is therefore private, 127.0.0.1 is your own computer, and 169.254.x.x means no address could be obtained.
Private IP ranges (RFC 1918)
In 1996 RFC 1918 set aside three blocks of IPv4 space that anyone may use inside their own network without asking a registry, on the condition that packets with those addresses never travel across the public internet. Internet routers drop them, so the same addresses can be reused in every home, office and data center on Earth. The three blocks differ only in size:
| Range | CIDR | Addresses | Typical use |
|---|---|---|---|
10.0.0.0 – 10.255.255.255 | 10.0.0.0/8 | 16,777,216 | Companies, campuses, cloud networks, some ISP routers |
172.16.0.0 – 172.31.255.255 | 172.16.0.0/12 | 1,048,576 | Mid-size networks; Docker and some corporate VPNs |
192.168.0.0 – 192.168.255.255 | 192.168.0.0/16 | 65,536 | Home and small-office routers |
IPv6 has an equivalent, unique local addresses in fc00::/7 (in practice fd00::/8, RFC 4193), but because IPv6 has addresses to spare, most devices simply get a public IPv6 address alongside their private IPv4 one.
10.0.0.0/8
The largest block: a single network of 16.7 million addresses, or more usually a company's whole address plan carved into hundreds of subnets such as 10.20.30.0/24 per floor or office. Some internet providers use it on the private side of their equipment too, and a few home routers (notably some cable gateways) hand out 10.0.0.x by default.
172.16.0.0/12
Sixteen contiguous /16 networks, 172.16.x.x through 172.31.x.x. Often forgotten, which is exactly why it is useful: Docker picks its container networks from 172.17.0.0/16 upwards, and VPN products use it to avoid clashing with the 192.168 network of the home the user is connecting from. If an address starts with 172 but the second number is outside 16–31, it is public.
192.168.0.0/16
The home range: 256 networks of 256 addresses. Nearly every consumer router ships with 192.168.0.1 or 192.168.1.1 as its own address and hands out 192.168.0.x or 192.168.1.x to devices. That is why 192.168.1.1 opens the router admin page in millions of homes, and why a device list showing 192.168.1.20 tells you nothing about which house it is in. The subnet calculator flags any address that falls in a private range.
What is a public IP?
A public address is one from the globally routed part of the address space: registered to a network through a regional registry, announced to the internet's routing system, and reachable from anywhere. Your provider assigns one to your connection, usually dynamically; it is the address shown in the card below and the one every website, game and app sees. Everything else that is not reserved for a special purpose is public, from 1.0.0.0 to 223.255.255.255.
Ownership of public space is a matter of public record. The IP lookup shows which organization holds any address, which country it is registered in and roughly where it is used; what is an IP address covers the registry system. Two caveats for home users: a growing number of providers put customers behind carrier-grade NAT, so the "public" address a website sees is shared with other customers and the address your router reports is from the 100.64.0.0/10 range; and the public address of a mobile phone changes constantly and belongs to a gateway that may be in another city.
Test it now
Cloudflare edgeRead at the Cloudflare edge from this request. The homepage adds your provider, network type and the VPN, DNS and WebRTC checks.
Show detailsHow NAT links them
Private addresses would be useless if devices carrying them could not reach the internet. Network address translation (RFC 3022) solves this in the router. When your laptop at 192.168.1.20 sends a packet to a website, the router replaces the source address with its own public address and the source port with a port it picks, and stores the pair in a table: 203.0.113.42:51234 ↔ 192.168.1.20:52001. When the reply arrives for port 51234, the router looks up the table, puts 192.168.1.20 back and delivers it. Thousands of connections from many devices can share one public address because each gets its own outside port.
The scheme has two consequences you meet in daily life. Outgoing connections work for free, but an incoming connection has no table entry, so the router drops it; that is why a server, camera or game host at home needs port forwarding (a manual table entry) or UPnP, and why NAT doubles as a rough firewall. And since the website only sees the shared address, everything in the house looks like one user to it, which is how a whole family can be rate-limited together. Carrier-grade NAT repeats the trick at the provider for hundreds of customers at once, with the added problem that port forwarding becomes impossible; what is NAT and what is CGNAT go deeper, and the port checker shows what is actually reachable from outside.
Special ranges: 127.0.0.1, 169.254.x.x, 100.64.0.0/10
Not every non-public address is an RFC 1918 private address. IANA keeps a registry of special-purpose blocks (RFC 6890 and later updates); these are the ones that turn up on home networks.
| Block | Name | What it means when you see it |
|---|---|---|
127.0.0.0/8 | Loopback | 127.0.0.1 (and ::1 in IPv6) is "this computer". Packets never leave the machine; localhost resolves to it. A server bound to it is reachable only from the same device (more). |
169.254.0.0/16 | Link-local (APIPA) | Self-assigned when no DHCP server answered (RFC 3927). A device showing 169.254.x.x has no working connection to the router: fix the cable, the Wi-Fi password or the router (more). |
100.64.0.0/10 | Shared address space | Reserved for carrier-grade NAT (RFC 6598). Seeing it as your router's WAN address means your provider shares one public address between several customers; port forwarding will not work and some games struggle. |
0.0.0.0/8 | "This network" | 0.0.0.0 means "no address" or "any address" in configuration; a server listening on it accepts connections on every interface. |
192.0.2.0/24, 198.51.100.0/24, 203.0.113.0/24 | Documentation | Reserved for examples in manuals and guides like this one; never assigned on the real internet (RFC 5737). |
224.0.0.0/4 | Multicast | Group addresses used by streaming, discovery and routing protocols; never a device's own address. |
fe80::/10 | IPv6 link-local | Every IPv6 interface has one; it works only on the local link and says nothing about internet access. |
A practical rule: if an address is in 10/8, 172.16/12 or 192.168/16 it is private; if it is in one of the rows above it is special; otherwise it is public. The subnet calculator applies the full IANA registry to any address you type, and what is my local IP shows the private one your browser can see.
Questions
What is a private IP address?
An address from one of the RFC 1918 ranges (10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16) that is valid only inside a local network. Your router assigns one to each device; the internet never sees it, so the same address can exist in every home at once.
Is 192.168.1.1 a public IP?
No. Every address starting with 192.168 is private. 192.168.1.1 is the default address of a great many home routers, which is why typing it into a browser opens the router's settings page on most networks.
Is 192.168 a local IP?
Yes: the whole 192.168.0.0–192.168.255.255 range is reserved for local networks. If your device shows a 192.168 address, that is its local address; your public address is a different number that only a website can show you.
What is the 127.0.0.1 IP address?
The loopback address, meaning "this computer". Traffic sent to it never leaves the device; it is how programs talk to a server running on the same machine, and localhost is its name. In IPv6 the equivalent is ::1.
Which three IP addresses are private?
The three private ranges are 10.0.0.0 to 10.255.255.255, 172.16.0.0 to 172.31.255.255 and 192.168.0.0 to 192.168.255.255. Any address inside them is private; everything outside them, apart from the special-purpose blocks, is public.
What is RFC 1918?
The 1996 standards document, Address Allocation for Private Internets, that reserved the three private ranges and set the rule that they are never routed on the public internet. It is why NAT exists and why private addresses are free to use.
Sources and further reading
- RFC 1918 — Address Allocation for Private Internets
- RFC 4193 — Unique Local IPv6 Unicast Addresses
- RFC 3022 — Traditional IP Network Address Translator (Traditional NAT)
- RFC 6598 — IANA-Reserved IPv4 Prefix for Shared Address Space
- RFC 3927 — Dynamic Configuration of IPv4 Link-Local Addresses
- RFC 5737 — IPv4 Address Blocks Reserved for Documentation
- RFC 6890 — Special-Purpose IP Address Registries
- IANA — IPv4 Special-Purpose Address Registry