Pebellslearn by building
0%
RoadmapsMatrixCoursesSandboxSign in
Networking for Defenders  ›  Lesson

DNS and DHCP: The Network's Phone Book and Receptionist

DNS 12 minDHCP hands devices their network settings and DNS turns names into addresses, so whoever controls those answers can steer a device, which is why they must be trusted and protected.

DNS and DHCP: The Network's Phone Book and Receptionist

When a laptop joins the shop Wi-Fi, it gets an address without anyone typing one. When Sam types the supplier's website name, the laptop finds the right server without knowing its number. Two quiet services make this work, and because everything trusts them, attackers like to imitate them.

The rule

DHCP tells a device who it is; DNS tells it where names live.

DHCP (Dynamic Host Configuration Protocol) is the receptionist. When a device joins, it asks and DHCP hands it:

  • an IP address,
  • the subnet mask,
  • the default gateway,
  • which DNS server to use.

In a small shop, the router usually does this job.

DNS (Domain Name System) is the phone book. It turns a name like supplier.example into an IP address the computer can connect to. Your device asks a DNS resolver, which asks other DNS servers if it does not already know.

Why defenders care: whoever answers these questions steers the device. A fake DHCP server could hand out a gateway or DNS server under an attacker's control. A poisoned or spoofed DNS answer could send Sam to a look-alike site. The defences are simple habits:

  • Protect the router's admin page with a strong, unique password and keep its firmware updated.
  • Use a trusted DNS resolver, such as your internet provider's or a well-known reputable service.
  • Keep guests on a separate network so their devices cannot join the staff one.
  • Rely on HTTPS: a look-alike server cannot show a valid certificate for the real name.

The shortcut

Follow a device joining the network and ask at each step: "Who gave me this answer, and should I trust them?"

Sam's laptop opens the supplier's siteStep 1 of 4
  1. Join

    The laptop joins staff Wi-Fi and DHCP on the router gives it 192.168.1.35, gateway 192.168.1.1 and a DNS server.

The trap is clicking through a certificate warning. That warning may be the only sign that a DNS answer was faked.

Drills

Answer fast — trust the rule.

quick drill

Which service turns a name like supplier.example into an IP address?

quick drill

Which of these does DHCP normally give a device when it joins?

quick drill

Why is a fake DHCP server dangerous?

quick drill

After a DNS answer is faked, what is most likely to warn Sam?

Remember

  • DHCP tells a device who it is; DNS tells it where names live.
  • Ask "who gave me this answer, and should I trust them?"
  • Trap: weak router admin passwords and clicking through certificate warnings.

Practice — level up

0/1 solved

Write your answer, then compare it with a rubric and a model answer.

ExplainWho gave me this answer?

Explain what DHCP and DNS each do for a laptop joining the shop Wi-Fi and visiting a website, then describe one way an attacker could abuse each and one defence the shop can use.