IP addresses: where exactly is that car going?
Welcome back to our Packet Highway, commonly known as the Internet!
Traffic is flowing as usual. Cars cross continents, the NAT gatekeeper is still searching for his notebook, and the smart fridge has filed its third appeal against an administrative decision.
Meanwhile, a fresh disaster is unfolding at the Quiet Network Estate.
It's all about licence plates.
Every car needs a number
One morning a new car pulls up outside the vehicle registration office.
— Hello, I'd like some licence plates.
— Fixed or temporary?
— Which are better?
— Depends.
— ON WHAT?!
— Whether you want to set the number yourself or have us assign it automatically.
— Are automatic numbers worse?
— No.
— And fixed ones better?
— Not necessarily.
— THEN WHY ARE THERE TWO TYPES?!
— So you can choose. NEXT!
On our highway, every device needs an IP address — a number that helps the network determine where information should be delivered.
In the IPv4 world, it might look like this:
192.168.1.10
Four numbers separated by dots, each from 0 to 255.
— I'd like 999.999.999.999, please!
— Doesn't exist.
— WHY NOT?!
— Because each number must be no higher than 255.
— Fine, then 255.255.255.255!
— Can't assign that either.
— BUT IT'S IN THE RANGE!
— True, but it's a special broadcast address.
— MEANING?!
— You can use it to shout to everybody on the local road. You can't bolt it onto your bumper.
— THEN WHAT NUMBER CAN I HAVE?!
— First tell me which estate you live on.
Because the number alone isn't the whole story.
Subnet masks, or where the estate ends
At the Quiet Network Estate, cars are parked under these addresses:
192.168.1.10
192.168.1.11
192.168.1.12
They all belong to network 192.168.1.0/24.
— What's that /24 supposed to mean?!
— The estate boundary.
— WHAT BOUNDARY?!
— It tells you which bits identify the network and which identify devices.
— IN NORMAL LANGUAGE?!
— We have a pool of numbers here. We know which cars belong to us and which live elsewhere.
In IPv4, /24 corresponds to subnet mask:
255.255.255.0
A typical subnet like this contains 256 addresses, of which 254 can usually be assigned to devices.
Two have special meanings:
192.168.1.0— network address.192.168.1.255— broadcast address.
— So I have 254 parking spaces?
— More or less.
— Can I park at 192.168.2.10?
— That's another estate.
— BUT IT'S RIGHT NEXT DOOR!
— Another estate.
— I CAN SEE IT OVER THE FENCE!
— Wave hello, then. You can't drive through the fence.
Which brings us to our next character.
Default gateway, or leaving the estate
Computer 192.168.1.10 wants to visit neighbour 192.168.1.11.
No highway trip is needed: they live on the same estate.
But one day the computer wants to visit 193.24.14.111.
— Hello, I'd like to go out.
— Where to?
— 193.24.14.111.
— That's outside the estate. Use the main gate.
— Where is it?
— 192.168.1.1.
— HOW WAS I SUPPOSED TO KNOW?!
— It should be in your documents.
That's the default gateway — where a device sends traffic destined outside the local network when it doesn't know a more specific route.
— And if I haven't got a gateway configured?
— You can still chat with the neighbours.
— AND THE INTERNET?!
— That might be a problem.
— BUT I WANT THE INTERNET!
— First find out where the exit is.
So the car has plates, knows the estate limits, but has no idea how to leave.
An IP address alone does not guarantee Internet access without the proper routing configuration.
Once it reaches the gate, our familiar adventure with routing begins.
Who issued my plates?!
Back to the registration office.
Ten cars are waiting outside the window.
— Hello, I need an address!
— NEXT!
— Me too!
— NEXT!
— I'm a fridge!
— Household appliance queue, please.
— THERE IS NO HOUSEHOLD APPLIANCE QUEUE!
— Then use the ordinary one.
Behind the glass sits DHCP (Dynamic Host Configuration Protocol) — the official who can automatically assign IP addresses and other network settings.
But not forever.
— Here you go: 192.168.1.50.
— Thank you! Is it mine forever?
— For a set period.
— WHAT DO YOU MEAN A SET PERIOD?!
— It's a lease.
— RENTAL LICENCE PLATES?!
— Correct.
— And when the lease expires?!
— You can ask to renew it.
— AND IF I FORGET?!
— Let's not worry about that yet.
DHCP assigns addresses on a lease. Devices can renew them and often keep the same address, but there's no unconditional promise that it will remain theirs forever.
And how does a new device get its address?
— HELLO! IS THERE A REGISTRATION OFFICE AROUND HERE?!
— YES!
— CAN I HAVE A NUMBER?!
— HOW ABOUT 192.168.1.50?!
— I'LL TAKE IT!
— APPROVED!
Those are the four stages of the familiar DHCPv4 process:
Discover → Offer → Request → Acknowledge, or DORA.
— WHY IS EVERYBODY SHOUTING?!
— The car doesn't have its own address yet, so it has to find the office.
— RIGHT. CAN WE BE QUIETER?!
— WE DON'T KNOW WHOM TO SPEAK TO!
The early DHCPv4 messages may use broadcast — calling out across the local network.
DHCP deserves a separate trip, though. There's far too much paperwork in this office for one chapter.
My neighbour stole my number!
One day the computer pulls into the car park.
Looks at its own plates:
192.168.1.10
Looks at the neighbour's car:
192.168.1.10
Looks again.
— EXCUSE ME!
— Yes?
— WHY DO YOU HAVE MY PLATES?!
— Your plates? I set them myself!
— BUT THAT'S MY NUMBER!
— HOW WAS I TO KNOW?!
— BECAUSE I'VE GOT IT!
— SO HAVE I!
— THIS IS IDENTITY THEFT!
— CALL THE ADMINISTRATOR!
The administrator arrives, examines both cars and sighs.
— Gentlemen, we have an IP address conflict.
— WHAT DOES THAT MEAN?!
— Two devices are trying to use the same IP address on the same network.
— AND NOW?!
— One of you must change it.
— I WAS HERE FIRST!
— I HAVE THE BETTER CAR!
— That's irrelevant.
— THEN WHY DID I BUY A BETTER CAR?!
Communication in such situations can become unreliable or break completely.
On a local IPv4 Ethernet network, ARP (Address Resolution Protocol) helps find the physical interface address — MAC address — associated with an IPv4 address.
— I've got 192.168.1.10 here. WHO IS THAT?!
— ME!
— ME TOO!
— GENTLEMEN! ONE AT A TIME!
ARP isn't the police and doesn't resolve the conflict. But devices can spot trouble through ARP, and incorrect address mappings can create genuine chaos.
Public, private and mysterious plates
Not every IPv4 address is a car that anyone on the Internet can reach directly.
Some addresses are private, intended for local networks.
The best-known ranges include:
| IPv4 range | Where you might find it |
|---|---|
10.0.0.0/8 | Large and small private networks |
172.16.0.0/12 | Private networks |
192.168.0.0/16 | Often home networks |
169.254.0.0/16 | Link-local addressing |
100.64.0.0/10 | Shared address space, including ISPs |
The first three are the classic RFC 1918 private IPv4 ranges. The others serve different special purposes.
— And what if my car has a private number?
— That number alone won't get you across the public Internet.
— THEN HOW DO PEOPLE LEAVE THEIR ESTATES?!
— Usually through a gate that swaps their plates.
— THAT BLOKE WITH THE NOTEBOOK AGAIN?!
— Yes.
— HAS HE FOUND IT YET?!
— No.
Which takes us back to our story about NAT and masquerading. 🤣
I made my own plates because the office was closed
One morning a car starts its engine.
Waits for an address.
Waits.
And waits.
— HELLO! ANYBODY THERE?!
Silence.
The DHCP server isn't responding.
— OH, WONDERFUL!
The car grabs a piece of cardboard and a marker and writes:
169.254.34.17
— DONE! I'VE GOT PLATES!
It pulls up at the highway exit.
— Where are you going?
— The Internet!
— With those plates?
— MADE THEM MYSELF!
— I can see that.
— SO?!
— You can talk to other cars on your local link if they're configured appropriately.
— AND THE INTERNET?!
— Not with that address.
— BUT I HAVE A NUMBER!
— It's not a pass to the whole world.
That's IPv4 Link-Local, often associated with APIPA (Automatic Private IP Addressing).
It can let devices communicate on the local link when normal IPv4 configuration isn't available. By itself, it does not provide routing to the Internet.
— SO I MADE PLATES THAT ONLY WORK ON THIS ESTATE?!
— On the local link.
— WHAT'S THE DIFFERENCE?!
— Administrative.
— I'VE HAD ENOUGH OF ADMINISTRATION!
And then IPv6 arrived...
One day a massive truck stops outside the office.
Another follows.
Then a third.
A fourth.
Soon the convoy is so long that the estate manager suspects an invasion.
A smartly dressed official steps out of the first truck.
— Good morning. We've brought a new numbering system.
— WHY?! THE OLD ONE WORKS!
— We're running short of available IPv4 numbers.
— THEN PRINT MORE!
— You can't invent more distinct values in a 32-bit address space.
— THEN MAKE BIGGER PLATES!
— That's precisely what we've done.
The official displays:
2001:db8:1234:5678::10
Silence.
— What's THAT?
— An IPv6 address.
— WHERE ARE THE DOTS?!
— There aren't any.
— WHY COLONS?!
— Different notation.
— WHY LETTERS?!
— Hexadecimal.
— WHY IS IT SO LONG?!
— Because it has 128 bits instead of 32.
— A HUNDRED AND TWENTY-EIGHT?!
— Correct.
— SO HOW MANY NUMBERS HAVE YOU GOT?!
— About 340 undecillion possible addresses.
— ...
— Anything else?
— YES. DO YOU HAVE ONE I CAN ACTUALLY REMEMBER?!
The official smiles.
— ::1.
— FINALLY! A NORMAL ONE!
— That's the loopback address.
— MEANING?!
— Yourself.
— YOU'VE GIVEN ME A NUMBER THAT LETS ME CALL MYSELF?!
— Correct.
— EXCELLENT. AT LEAST MY LINE WILL NEVER BE BUSY!
🤣
IPv6: plates so long the neighbour refuses to copy them
IPv4 addresses have 32 bits.
IPv6 addresses have 128 bits, written with hexadecimal numbers and colons.
Under specific rules you can omit zeros.
For example:
2001:0db8:0000:0000:0000:0000:0000:0001
can be shortened to:
2001:db8::1
— SO IT CAN BE SHORTER?
— Yes.
— WILL IT ALWAYS BE THAT SHORT?
— No.
— THEN HOW AM I SUPPOSED TO REMEMBER IT?!
— You don't have to. DNS names can help.
— ANOTHER GOVERNMENT OFFICE?!
— More like an address book.
— IS THERE ANYTHING ON THIS INTERNET THAT DOESN'T NEED AN OFFICE?!
— Of course.
— WHAT?!
— An outage.
— ...
IPv6 also handles local networking differently.
Instead of ARP, it uses NDP (Neighbor Discovery Protocol), which works through ICMPv6.
Addresses can be configured automatically with SLAAC, using DHCPv6, or manually.
— SO I DON'T HAVE TO QUEUE FOR PLATES ANYMORE?
— In some setups the car can configure its address from information about the network.
— BY ITSELF?!
— Yes.
— AND NO DUPLICATES?!
— Duplicate-address detection helps identify them.
— WHAT ABOUT THE DEFAULT GATEWAY?!
— Information about routers can come from RA announcements.
— WHAT'S RA?!
— Router Advertisement.
— ANOTHER OFFICIAL?!
— This time it's a notice from the road manager.
— I WANT MY DOTS BACK!
Where did all the shouting go?!
Our old IPv4 driver is used to shouting across the entire estate when he doesn't know whom to ask.
— HELLO EVERYBODY! WHO HAS THIS ADDRESS?!
And in IPv6?
— Hello, I'd like to shout to everyone!
— We don't have conventional broadcast.
— WHAT DO YOU MEAN YOU DON'T?!
— We have multicast.
— WHAT'S THAT?!
— Sending to a selected group.
— SO NOT EVERYBODY?!
— Depends on the group.
— AND IF I WANT JUST ONE?!
— Unicast.
— WHAT IF I WANT THE NEAREST OF SEVERAL?!
— That can be anycast.
— ARE YOU TRYING TO ANNOY ME?!
— No. We haven't even started on prefixes.
— THEN DON'T START!
IPv6 doesn't use IPv4-style broadcast. Multicast-based mechanisms take over many of its jobs.
IPv4 and IPv6 meet in a car park
One evening two cars meet outside the estate shop.
The first has ordinary plates:
192.168.1.10
The second has long ones:
2001:db8:1234:5678::10
— Good evening.
— Good evening.
— New here?
— Yes. IPv6.
— I'm IPv4.
— Pleasure.
— Shall we drive together?
— Gladly.
— Which way?
— I'm using IPv6.
— I'm on IPv4.
— ...
— ...
— CAN WE EVEN UNDERSTAND EACH OTHER?!
Here's the important detail: IPv4 and IPv6 are different Internet protocols. They can't talk directly merely because both carry information across the Internet.
That's why we have dual-stack devices that support both, plus transition and translation technologies such as NAT64.
— SO I NEED TWO SETS OF PLATES?
— With dual-stack you may have IPv4 and IPv6 addresses at the same time.
— CAN I HAVE TWO NOTEBOOKS?!
— Sir, please. No more notebooks.
— AND THE FRIDGE?!
— The fridge already has three IPv6 addresses.
— THREE?!
— A local one, a global one, and a temporary one.
— WHY SO MANY?!
— It depends on its configuration and privacy features.
— AND IT STILL CAN'T FIND THE MILK!
What really happens at the registration office?
An IP address is a logical address assigned to a network interface. It helps devices direct information, but it's not the same thing as a MAC address or a device serial number.
One device can have multiple IP addresses, and addresses can change over time.
| Term | On our highway |
|---|---|
| IPv4 address | Shorter plates, 32 bits |
| IPv6 address | Much longer plates, 128 bits |
| Subnet mask / prefix | Estate boundary |
| Default gateway | Main exit from the estate |
| DHCP | Office automatically assigning addresses |
| Static IP | A number set manually |
| ARP | Finding which neighbour owns an IPv4 address |
| NDP | IPv6 neighbour discovery |
| SLAAC | Automatic IPv6 address configuration |
| APIPA / IPv4 Link-Local | Emergency local-road plates |
| Dual-stack | Two sets of plates: IPv4 and IPv6 |
Not every address may be assigned freely. Not every address is globally reachable. And knowing a destination doesn't necessarily mean having a route to it.
That's why addressing, routing, and NAT are so closely connected.
To explore more of our Packet Highway, take a look at DHCP, DNS, TCP and UDP.
Meanwhile, at the registration office...
— BOSS! WE HAVE A PROBLEM!
— WHAT NOW?!
— The fridge is here.
— THE MILK AGAIN?!
— No. It wants to change its address.
— To what?
— IPv6.
— Give it one.
— It wants ALL possible addresses!
— ALL OF THEM?!
— Yes.
— WHY?!
— It says surely one of them must be where the milk is.
— ...
— Boss?
— WHAT?!
— The toaster wants a static address.
— GIVE IT ONE!
— The computer has reported an address conflict.
— WITH WHOM?!
— The printer.
— AND THE PRINTER?!
— Printed a complaint.
— WHAT DOES IT SAY?!
— “Invalid sender address.”
— ...
— Boss, are you all right?
— CLOSE THE OFFICE. I'M GOING TO THE HIGHWAY.
— What about the company car?
— WHAT ABOUT IT?!
— It didn't get an address from DHCP.
— THEN I'LL WALK!!! 🤣🤣
Next time we'll visit the DHCP office. Meet the clerk who lends out addresses for a limited time and find out why renewing a lease can matter more than a vehicle inspection.
Estate management requests that cars not be parked at 0.0.0.0. Investigations into the whereabouts of this particular car park are ongoing.
