IP fundamentals

Public IP vs. private IP addresses

A private address is intended for use inside a network. A public address can be used for internet routing, subject to allocation, routing and firewall rules.

Updated

Recognizing private IPv4 ranges

The private ranges are 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16. Not every address beginning with 172 is private: only 172.16 through 172.31 falls within that block. Multiple independent networks may reuse the same private ranges without coordinating.

Why the numbers differ

A router performing NAT maintains a mapping between internal connections and external addresses and ports. The remote server sees the translated source. Two laptops on the same Wi-Fi may therefore have different local addresses but show the same public IPv4 address.

Two devices, one external address

Illustrative data · No network requests

192.168.1.20
192.168.1.21
NAT router192.0.2.8
WebsiteSees 192.0.2.8

192.168.1.20 · 192.0.2.8

Laptop connects

The laptop uses a private address behind the router.

Step 1 / 3
Read all scenarios
  1. Laptop connects: 192.168.1.20 · 192.0.2.8 · Sees 192.0.2.8. The laptop uses a private address behind the router.
  2. Phone connects: 192.168.1.21 · 192.0.2.8 · Sees 192.0.2.8. A second device can use the same public-facing IPv4 address.
  3. Compare: Two local IPs · One external IP · Same source IP. A shared public IP does not uniquely identify either device.

Other non-public ranges

127.0.0.0/8 is loopback, 169.254.0.0/16 is link-local, and 100.64.0.0/10 is shared address space frequently used by carriers. These are not interchangeable with the RFC 1918 private ranges. They should not be assigned ordinary public geolocation results.

IPv6 is different

IPv6 networks may give devices globally routable addresses without IPv4-style NAT. Unique local and link-local IPv6 addresses have different scopes. Having a global address does not mean unsolicited inbound traffic is allowed: firewall policy still matters.

Working through a learning path?

Record your own progress on this browser. No account required.

Learning paths →

Try this

Compare your device's network settings with My IP. If they differ, that can be normal and is not by itself evidence of a VPN or intrusion.

Inspect your own IP address →

Technical references