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?"
Join
The laptop joins staff Wi-Fi and DHCP on the router gives it
192.168.1.35, gateway192.168.1.1and 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.
Which service turns a name like supplier.example into an IP address?
Which of these does DHCP normally give a device when it joins?
Why is a fake DHCP server dangerous?
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.
