IP Addresses
The postal address every device on a network needs — IPv4, IPv6, public vs. private, static vs. dynamic.
Big idea
An IP address is how other machines reach a device and where it currently sits on the network, which is why it can change when a device moves, and why IPv4's limited address space pushed workarounds like NAT.
The idea
Every device that talks on a network needs an address — something every other device can use to say "send this here." An IP address is that address: a number (written in a human-friendlier form) that identifies a device on a network, the same way a street address identifies a house.
Two things can be true about a device's IP address at once: it's how other machines reach it, and it's where it currently lives on the network topology — which is why an address can change when a device moves onto a different network.
Think of it like
Picture a large apartment building with a single street address. Inside, units are numbered 101, 102, 205, and those numbers mean nothing outside; the building next door has its own unit 101. Mail from the outside world arrives at the street address, and the front desk passes each letter to the right unit. A new tenant may be given whichever unit is free, while the building's own address stays put. That's the public and private split: private IPs are unit numbers, the public IP is the street address, and NAT is the front desk translating between them.
IPv4 vs. IPv6
IPv4 is four numbers from 0–255 separated by dots, like 192.168.1.1. It's a 32-bit address space, which sounds like a lot until you realize that's only about 4.3 billion possible addresses — and the internet has more connected devices than that. We've been patching around this exhaustion for two decades with tricks like NAT (many devices sharing one public address).
IPv6 is the actual fix: a 128-bit address space, written as eight groups of hex digits, like 2001:0db8:85a3:0000:0000:8a2e:0370:7334. That's enough addresses to give every grain of sand on Earth its own IP with room to spare. Adoption has been slow because IPv4 and IPv6 aren't directly interoperable — a network has to support both during the transition, which most of the internet still is, decades in.
Public vs. private
A public IP is globally unique and routable on the open internet — it's how your home network is seen from outside. A private IP (ranges like 192.168.x.x or 10.x.x.x) only means something inside a local network; your laptop, phone, and smart TV can all share the same private range at home because a router translates between them and the one public address your ISP gave you (that translation is NAT — Network Address Translation).
This is also a quiet security boundary: a device with only a private IP isn't directly reachable from the internet at all unless something explicitly forwards traffic to it.
Static vs. dynamic
A static IP is manually assigned and never changes — servers typically want this, since clients need a stable address to find them at. A dynamic IP is handed out automatically (usually by DHCP) and can change over time, which is fine for most client devices and simplifies managing a large network, since nobody has to hand-assign addresses to every laptop that joins.
By the numbers
| Fact | Number |
|---|---|
| IPv4 addresses | 2³² ≈ 4.3 billion — fewer than the people and devices online |
| IPv6 addresses | 2¹²⁸ ≈ 3.4 × 10³⁸ |
A /24 block | 2⁸ = 256 addresses (254 usable hosts) |
A /16 block | 65,536 addresses; 10.0.0.0/8 holds 16.7 million |
| Typical Ethernet MTU | 1,500 bytes per packet |
| IPv4 / IPv6 header | 20 bytes (up to 60) / 40 bytes fixed |
CIDR arithmetic is just powers of two: a /n network holds 2³²⁻ⁿ addresses. A /20 subnet is 2¹² = 4,096 addresses — which is why cloud VPC planning is done in prefix lengths, not address counts.
IPv4's 4.3 billion ran out years ago; NAT (many private addresses sharing one public one) is what kept it going, and it's also why a server can't simply connect to your laptop.
How many addresses does a /22 subnet hold?
A server on the internet tries to open a connection to your laptop at 192.168.1.10. What happens?
Key terms
- IPv4 — The 32-bit address format written as four numbers from 0 to 255, with only about 4.3 billion possible addresses.
- IPv6 — The 128-bit address format written in hex groups, large enough to end address exhaustion.
- Private IP — An address that only has meaning inside a local network and cannot be reached directly from the internet.
- NAT — Translation that lets many devices with private addresses share one public address.
- DHCP — The service that hands out dynamic IP addresses to devices automatically.