Basecamp NetworkingFundamentals

DHCP: How Devices Get Addresses Without Asking You

You've connected hundreds of devices to networks and never once typed an IP address. Something did it for you — here's the four-step conversation.

Every device needs an IP address before it can communicate — yet you've joined hundreds of networks without ever typing one. Someone has to hand out those addresses, ensure no two devices get the same one, and take addresses back when devices leave. That someone is DHCP (Dynamic Host Configuration Protocol), and it's a service quietly running on your router right now.

The four-step conversation

The moment a device joins a network, it shouts into the void — it has no address yet, so broadcasting is all it can do:

The whole exchange takes under a second, and it's why Wi-Fi "just works" — a hotel, an office, and your kitchen all run the same ritual.

Leases: addresses are borrowed, not owned

DHCP lends addresses for a fixed period — the lease — commonly a day or a week. Devices renew quietly in the background; devices that leave simply let their lease expire, and the address returns to the pool for someone else. This is the system's elegance: a coffee shop can serve thousands of customers a month from a pool of a couple hundred addresses, because nobody keeps one forever.

Trail note

Memorise this one number: 169.254.x.x. When a device can't find any DHCP server, it gives itself an emergency address in that range so networking doesn't totally collapse. Spot an address starting 169.254 during troubleshooting and the diagnosis is instant: this device asked for an address and nobody answered — the DHCP conversation itself failed. Cable, Wi-Fi, or server, but the search space just collapsed.

Reservations: automatic, but predictable

Some devices — printers, servers, cameras — need the same address every time, because other things are configured to find them there. Rather than configuring them manually, the standard trick is a DHCP reservation: the server recognises the device (by its hardware MAC address) and always deals it the same card. Automatic and predictable — the best of both, and standard practice in any managed network you'll work on.

Next waypoint — Basecamp

Routers vs Switches: Who Actually Does What →