Lessons › Networking fundamentals
DORA and the phonebook: DHCP and DNS
▶ Start the interactive lesson
Ticket #131, from HR: "Three new starters' laptops show 'No internet'." You run ipconfig: 169.254.12.7. Maya: "That address is a cry for help. Something went wrong before the laptop even got an address."
Why DHCP exists
Typing an IP, mask, gateway and DNS server into 500 laptops by hand means typos, duplicate addresses and hours of work. DHCP (Dynamic Host Configuration Protocol) hands all of it out automatically when a device joins the network.
DORA: four messages
Discover: the new device broadcasts "is there a DHCP server?" (it has no IP yet, so it uses 0.0.0.0). Offer: the server offers an address. Request: the device asks for that address. Ack: the server confirms, and the device configures itself.
Pools, leases and reservations
A scope or pool is the range the server hands out (e.g. .100–.200), plus the mask, gateway and DNS to give out. Keep printers and servers out of the pool, or give them a reservation: always the same IP for one MAC address.
When DHCP fails
No answer → the device gives itself a 169.254.x.x address (APIPA). If you see that on a ticket, think "DHCP problem".
DNS: the internet's phonebook
People remember names (intranet.burrow.local); networks need IPs. DNS turns names into IP addresses. An A record maps a name to an IPv4 address.
Key points
- DHCP hands out IP settings automatically in four steps: DORA. 1. Discover (broadcast): "Any DHCP servers?" 2. Offer: "You can have 10.1.1.23" 3. Request: "Yes please, 10.1.1.23" 4. Acknowledge: "It's yours, with gateway .1, DNS 10.1.1.5, lease 8 hours"
- Broadcasts don't cross routers. If the DHCP server is on another subnet, the router needs a DHCP relay (e.g. ip helper-address) to forward the request.
- DNS is the phonebook: it turns leeds.burrow.local into an IP. It uses port 53. Answers are cached for their TTL, which is why DNS changes "take time".