Network & Ops · Ch. 2
IP Address Basics: Public vs. Private, IPv4 vs. IPv6, and Subnet Masks
WebTool Team · Published 2026-09-08 · IP / Networking / IPv6 / Subnets
An IP address is a device's "delivery address" on a network. The 192.168.x.x you see behind your router is a private address; outbound traffic gets rewritten by NAT to the public address your ISP assigned — which is why "check my local IP" and "check my public IP" give two different answers. This site offers What's My IP and IP geolocation lookup tools.
IPv4: what the four numbers are
IPv4 is 32 bits, written as four 8-bit segments in dotted decimal, each 0–255:
192.168.1.100 = 11000000.10101000.00000001.01100100
That's about 4.3 billion addresses — long since exhausted. This shortage is the fundamental reason IPv6 exists (128 bits, written as eight hexadecimal groups, e.g. 2001:db8::1).
Public vs. private
Three reserved ranges are valid only inside private networks; public routers drop them outright:
| Range | CIDR | Typical setting |
|---|---|---|
| 10.0.0.0 – 10.255.255.255 | 10.0.0.0/8 | Corporate intranets |
| 172.16.0.0 – 172.31.255.255 | 172.16.0.0/12 | Corporate intranets, Docker |
| 192.168.0.0 – 192.168.255.255 | 192.168.0.0/16 | Home routers |
Two more special addresses: 127.0.0.1 (loopback — a successful ping only proves your local network stack works) and 0.0.0.0 (when listening, means "all interfaces").
Subnet masks and CIDR
192.168.1.100/24 means the first 24 bits are the network portion and the last 8 are the host portion — equivalent to the mask 255.255.255.0. Devices on the same subnet (same first 24 bits) can talk directly; crossing subnets requires a router (the gateway). A /24 has 254 usable hosts, a /16 has 65,534 — quick estimate: subtract the prefix from 32, and the remaining bits give you 2^n addresses. To compute the exact network address, broadcast address and usable host range of any CIDR, use the IPv4 subnet calculator; for IPv6 expansion/compression and subnet ranges, use the IPv6 subnet calculator; for converting between dotted, decimal and binary forms, use the IP address converter. Chapter 5 of this series, "Subnetting and CIDR in Practice", covers the full method.
Two frequent confusions
- Why "my IP's location" is inaccurate: geolocation comes from IP allocation databases, and dynamic ISP assignment plus CDN nodes skew it — city-level precision is often off.
- Your local IP is not your public IP:
ipconfig/ifconfigshows the private address; to learn your outbound public IP you have to ask an external service (our "What's My IP" works exactly this way).
Last updated: 2026-09-08