IP Addresses, and Why There Are Two Kinds Now
Every device that talks on a network needs an address, the same way every house needs one for mail to reach it. On the internet that's an IP address. You've seen them: something like 192.168.1.20, or a longer, uglier thing full of colons. Those are the two flavors, IPv4 and IPv6, and the reason both exist is a pretty good story about running out of room.
IPv4: the one you recognize
An IPv4 address is four numbers from 0 to 255, separated by dots. Under the hood it's just a 32-bit number, and the dots are there so humans can read it. 32 bits gives you a little over four billion possible addresses.
When IPv4 was designed, four billion seemed absurdly generous. Then everyone got a computer, then a phone, then a watch, a TV, a doorbell and a fridge. Some chunks of the space are reserved for special uses, big early allocations went to organizations that didn't need them all, and the regional registries that hand out blocks have long since run out of fresh ones to give away. IPv4 addresses are now something organizations buy and sell.
So how does the internet keep working on IPv4? Mostly with a trick called NAT.
NAT and private addresses
Look at your laptop's IP right now and it's probably something starting with 192.168, or 10., or 172.16 through 172.31. Those ranges are private. They're set aside for use inside local networks and are never routed on the public internet. Millions of homes are using 192.168.1.20 at the same time and that's fine, because none of them are visible from outside.
Your router has one public IP from your ISP. When your laptop requests a web page, the router rewrites the request so it looks like it came from that public address, remembers which device asked, and sends the reply back to the right one when it comes in. That's Network Address Translation. One public address, a whole house of devices behind it.
NAT is clever and it saved IPv4, but it has costs. Devices behind it can't easily be reached from outside, which breaks things like hosting a game or a server at home (hence port forwarding). Some ISPs now put customers behind their own NAT too, so you don't even get a public IPv4 to yourself. And it means the internet's original idea, any device can talk to any other device directly, mostly isn't true anymore.
IPv6: room for everything
IPv6 fixes the shortage by going big. Addresses are 128 bits, written as eight groups of four hex digits separated by colons:
2001:0db8:85a3:0000:0000:8a2e:0370:7334
There are shortening rules. Leading zeros in a group can go, and one run of all-zero groups can be collapsed to ::, so that becomes:
2001:db8:85a3::8a2e:370:7334
The number of possible addresses is so large it stops being meaningful. Your ISP can hand your home an entire block with more addresses than the whole IPv4 internet, and nobody will ever notice the dent. Every device can have a globally unique address again.
People hear that and worry: wait, so every device in my house is exposed? Not really. Your router still runs a firewall that blocks unsolicited incoming connections by default. NAT was never meant to be a security feature, the firewall is what actually protects you, and it works the same with IPv6. Devices also typically use temporary, rotating addresses for outgoing connections so they're harder to track over time.
A few addresses worth knowing
127.0.0.1(IPv4) and::1(IPv6) both mean "this machine." That's localhost.192.168.x.x,10.x.x.xand172.16.x.xto172.31.x.xare private IPv4 ranges.- IPv6 addresses starting with
fe80:are link-local, only valid on your local network segment. 2001:db8::is reserved for documentation, which is why it shows up in examples like the one above.
Do you need to care?
For everyday browsing, no. Most home connections and phones run both at once (called dual stack), and your device picks whichever works. You won't notice.
If you self-host anything, it's worth paying attention. A service might be reachable over IPv6 and not IPv4 or the other way around, and your DNS needs an A record for IPv4 and an AAAA record for IPv6. Firewall rules have to cover both. It's a common gotcha to lock down IPv4 carefully and leave IPv6 wide open on a server without realizing it.
The honest summary of the transition is that it's been slow, it's still happening, and IPv4 isn't going away any time soon. Learn to read both. The colons stop looking scary after a while.

Comments