2.2DNS, DHCP & how the internet works
Two quiet services make everyday networking possible. DNS (Domain Name System) is the internet's phone book: it translates human-friendly names like example.com into the numeric IP addresses machines actually use. Every time you open a site, your device asks a DNS server « what is the address for this name? » and gets back an IP to connect to. When DNS fails, sites become unreachable by name even though the network itself is fine — a very common and very recognizable symptom.
DHCP (Dynamic Host Configuration Protocol) is the other workhorse: it automatically hands out IP addresses (plus mask, gateway and DNS servers) to devices joining the network, so nobody configures each one by hand. This is why a laptop simply connects and works. Behind these sits the request-response rhythm of the web: your browser (a client) resolves a name via DNS, opens a connection to the server, and exchanges data. Understanding this chain is what lets you diagnose precisely: if you can reach a site by its IP but not its name, DNS is the suspect; if a machine gets no address at all (a 169.254 address), DHCP is. Knowing where each service fits turns vague « the internet is down » reports into targeted checks.
Section vocabulary
- DNS
- The service that translates domain names (example.com) into IP addresses — the internet's phone book.
- DHCP
- The service that automatically assigns IP addresses and network settings to devices joining a network.
- Name resolution
- The act of turning a name into an address via DNS.
- DNS server
- A machine that answers name-to-address questions; devices are usually told which one to use by DHCP.
- Request-response
- The pattern where a client asks and a server answers, underlying most web traffic.
What is DNS for?
In practice — See DNS and DHCP at work
- On a machine, look at the IP config and note which DNS server(s) it was given.
- Confirm the address was obtained automatically (DHCP) rather than set by hand.
- Test name resolution: try reaching a site by name, then discuss what it would mean if only the IP worked.
- Explain in one sentence what breaks if the DHCP server goes down.
Key takeaways
- DNS translates names to IP addresses; DHCP hands out addresses and settings automatically.
- Site unreachable by name but fine by IP → suspect DNS.
- No address at all (169.254) → suspect DHCP.
- The web runs on request-response: the client asks, the server answers.
Frequently asked questions
What is the practical difference between DNS and DHCP — they both sound like « network magic »?
They solve two different problems. DHCP answers « what is my address? » — when a device joins the network it receives an IP address, mask, gateway and DNS server automatically, so nobody configures each machine by hand. DNS answers « where is this name? » — it turns example.com into the numeric address needed to connect. In sequence: DHCP gets your device onto the network with a working address and tells it which DNS server to ask; then, whenever you use a name, DNS resolves it to an address. That is why a DHCP failure leaves a device with no valid address at all, while a DNS failure leaves it connected but unable to find sites by name.
A user says « the internet is down » but some things still work — how do I narrow it?
Split the problem using the two services. If they can reach a site by typing its IP address but not by its name, the network path is fine and DNS is the culprit — try a different DNS server or flush the resolver. If nothing works and the machine shows a 169.254 address, it never got an address, so DHCP or the physical link is the issue. If only one application fails while browsing works, it is not the network at all. Asking « does it fail by name only, or by address too? » and « one app or everything? » converts a vague complaint into a precise, quick diagnosis.