Public and private IP addresses
Updated
A public address is one that can be reached across the internet and is unique to one network at a time. A private address is reserved for use inside a home, office or data center. Routers on the internet are set to drop traffic for private addresses, so the same private address can be used in millions of separate networks without clashing.
The private ranges
- 10.0.0.0/8 (about 16.8 million addresses), common in companies
- 172.16.0.0/12 (about 1 million addresses)
- 192.168.0.0/16 (65,536 addresses), common in homes
These three IPv4 ranges are set aside for private use. IPv6 has a similar range for private networks (fc00::/7, in practice addresses starting fd), but IPv6 has so many addresses that most devices simply use public ones, with a firewall deciding what may reach them.
Other special addresses
- 127.0.0.0/8 and ::1 point back at the device itself (loopback)
- 169.254.0.0/16 and fe80::/10 are link-local: a device gives itself one when it cannot get an address, and it only works on the same local network
- 100.64.0.0/10 is shared address space that some internet providers use between you and their own equipment (carrier-grade NAT)
- 192.0.2.0/24, 198.51.100.0/24, 203.0.113.0/24 and 2001:db8::/32 are reserved for examples and documentation
How a private device reaches the internet
Your router has one public address on its internet side. When a device with a private address sends a request out, the router swaps in its own public address and remembers who asked, so it can pass the reply back. This is network address translation, or NAT. A website therefore sees the router's public address, not the private one your device shows in its settings.
Good to know. If the address your device shows and the address a website sees are different, that is normal. If the address a website sees falls in 100.64.0.0/10 or is shared with many other customers, your provider is sharing one public address between several homes.
Classify an address in the subnet calculator
Related
- What is an IP address?What an IP address is, how IPv4 and IPv6 differ, and why the address a website sees may not be your own device's.
- Subnets and CIDR notationHow CIDR notation such as 192.168.1.0/24 splits an address into a network part and a host part, and how many addresses a subnet holds.
- Signs of a VPN or proxyWhy a website can never be sure whether you use a VPN, which indirect signs it can look at, and how often they mislead.
- MAC addresses and what they revealWhat a MAC address is, how its first digits name the manufacturer, why phones now use random ones, and what it cannot prove.