DNS and DHCP Explained

HomeAP Networking › DNS and DHCP Explained
AP Networking · Core Concept Core Concept · Connect & Configure

DNS and DHCP Explained

The two services that make networks usable, DHCP for automatic addressing and DNS for name resolution, and how to tell their failures apart.

Two background services make modern networks usable: DHCP, which gives devices an address automatically, and DNS, which turns human-friendly names into the addresses devices actually use. When either fails, the symptoms are distinctive and easy to diagnose once you understand them.

DHCP: Automatic Addressing

DHCP (Dynamic Host Configuration Protocol) is the service that automatically gives a device the settings it needs to communicate: an IP address, the default gateway, and which DNS servers to use. Without it, every device would have to be configured by hand.

  • A device joins the network and requests configuration.
  • The DHCP server assigns an available address and the supporting settings.
  • The device can now communicate, no manual setup required.

When DHCP fails: a device gets no valid address and cannot communicate normally at all, the symptom is "no network," not "names do not work."

DNS: Names to Addresses

DNS (Domain Name System) translates names people can remember into the numerical addresses networks use. People type a name; DNS resolves it to an address; the device connects to that address.

When DNS fails: the device has a valid address and can reach other devices by address, but cannot reach anything by name. This very specific symptom, "addresses work, names do not", is the signature of a DNS problem.

Telling Them Apart

Symptom Likely service
Device has no valid address at all DHCP
Address works, local devices reachable, but names fail DNS
Everything works by address but every website name fails DNS
Device cannot communicate on the network at all DHCP or the link

This pair is one of the most testable troubleshooting distinctions in the course: no address points to DHCP; names-only failure points to DNS.

Practice Questions

A device has a valid IP address and can reach other local devices, but cannot open any website by name. Which service is the MOST likely culprit?
  • A. DHCP, because the device has no address
  • B. DNS, because names are not resolving to addresses
  • C. The firewall, because traffic is blocked entirely
  • D. The power supply, because the device is on
Answer: B. A valid address and local reachability rule out DHCP and the link. Failure only when using names is the classic DNS signature.
A newly connected device cannot communicate on the network at all and shows no valid address. Which service is MOST likely involved?
  • A. DNS, because names are failing
  • B. DHCP, because the device did not receive an address
  • C. QoS, because traffic is not prioritized
  • D. Port forwarding, because no path is open
Answer: B. No valid address at all points to DHCP (or the underlying link), not DNS. DNS problems show up only when using names, after a valid address is in place.

Frequently Asked Questions

What is the difference between DNS and DHCP?

DHCP automatically assigns a device its address and settings; DNS translates names into addresses. They solve different problems and fail with different symptoms.

What happens when DNS fails?

The device has a valid address and can reach others by address, but cannot reach anything by name, the signature names-only failure.

What happens when DHCP fails?

The device gets no valid address and cannot communicate on the network normally at all, a no-network symptom rather than a names-only one.

Keep Studying

IP Addressing & SubnettingWhat DHCP assigns and DNS resolves to.Topic 1.2: Connecting & OptimizingThese services in a working connection.OSI & TCP/IP ModelsWhere these services sit in the layers.

Put It Into Practice

Test these concepts on the full interactive AP Networking practice exam.

Take the Practice Exam Course Hub

Get in Touch

Whether you're a student, parent, or teacher — I'd love to hear from you.

Just want free AP CS resources?

Enter your email below and check the subscribe box — no message needed. Students get daily practice questions and study tips. Teachers get curriculum resources and teaching strategies.

Typically responds within 24 hours

Message Sent!

Thanks for reaching out. I'll get back to you within 24 hours.

🏫 Welcome, fellow educator!

I offer curriculum resources, practice materials, and study guides designed for AP CS teachers. Let me know what you're looking for — whether it's classroom materials, a guest speaker, or Teachers Pay Teachers resources.

Email

[email protected]

📚

Courses

AP CSA, CSP, & Cybersecurity

Response Time

Within 24 hours

Prefer email? Reach me directly at [email protected]