Skip to content

3. DNS and DHCP

Two services quietly handle almost everything about getting online: one gives your device an address, the other turns names into addresses.

DHCP: getting an address automatically

Without DHCP, every device would need a hand-typed IP address — unworkable for a network with more than a few machines. DHCP automates it through a four-step handshake, nicknamed DORA:

  1. Discover — the device broadcasts "is anyone out there with an address for me?"
  2. Offer — a DHCP server replies with an available address.
  3. Request — the device says "I'll take that one."
  4. Acknowledge — the server confirms, and the device starts using it.

This address is leased, not permanent — it expires after a set time and gets renewed or reassigned.

DNS: turning names into addresses

Computers route traffic by IP address, not by name — DNS is the lookup that makes vhslab.online resolve to an actual address, the same way a phone's contacts app turns a name into a number before dialing.

A few record types you'll see constantly:

Record Holds
A A domain's IPv4 address
AAAA A domain's IPv6 address
CNAME An alias pointing to another domain name
MX Which mail server handles email for a domain

Try it

Trace what happens, step by step, when you type vhslab.online into a browser: what has to happen with DNS before your computer even knows where to send the first byte of the request?

Tip

If a whole network can reach some sites by IP address but not by name, that's almost always a DNS problem, not a connectivity problem — the lab itself hit exactly this (its ISP blocks port 53, so pve1 runs a DoH proxy to work around it).

Play it

Try the DNS and DHCP Lab for hands-on practice with the DORA handshake and DNS record lookups.

Watch along

From the CompTIA A+ 220-1201 Full Course:

Next: Network Types and Topologies →