Achievable logo
Achievable blue logo on white background

Dynamic Host Configuration Protocol (DHCP)

DHCP (Dynamic Host Configuration Protocol) is a network protocol that automatically assigns IP addresses and related settings — subnet mask, default gateway, and DNS servers — to devices joining a network, leasing each address for a limited time.

Dynamic Host Configuration Protocol (DHCP) automates IP configuration. When a device joins a network, a DHCP server hands it everything it needs to communicate: an IP address, subnet mask, default gateway, and DNS server addresses, plus optional settings like the domain name. Without DHCP, an administrator would have to configure every host by hand and track which addresses are in use.

The exchange follows a four-step sequence remembered as DORA: the client broadcasts a Discover message to find servers, a server responds with an Offer containing a proposed address, the client broadcasts a Request accepting one offer, and the server finalizes with an Acknowledgment. DHCP runs over UDP, with servers listening on port 67 and clients on port 68. Addresses are granted as leases — the client must renew before the lease expires, or the address returns to the pool for reuse.

Because Discover messages are broadcasts, they don't cross routers on their own. Networks solve this with a DHCP relay agent — on Cisco routers, the ip helper-address command — which forwards client broadcasts as unicast to a central DHCP server, letting one server serve many subnets. Servers can also reserve specific addresses for particular devices, and networks defend against rogue DHCP servers with switch features like DHCP snooping, which permits server responses only on trusted ports.

The CCNA exam tests DHCP in depth: know the DORA sequence and its ports, lease mechanics, how to configure a router as a DHCP server or relay agent, and how DHCP snooping protects the network at layer 2.

Key takeaways

  • DHCP automatically assigns IP addresses, subnet masks, default gateways, and DNS servers to network clients.
  • The DORA process — Discover, Offer, Request, Acknowledge — completes the assignment over UDP ports 67 (server) and 68 (client).
  • Addresses are leased for a limited time and must be renewed, allowing unused addresses to be reclaimed.
  • A DHCP relay agent (ip helper-address on Cisco routers) forwards client broadcasts to servers on other subnets.
  • DHCP snooping blocks rogue DHCP servers by trusting only designated switch ports.
Achievable blue logo on white background

Where you'll learn this

Dynamic Host Configuration Protocol (DHCP) is covered in this Achievable course — jump straight to the textbook sections that teach it, or explore the full course with practice questions and exams:

Achievable blue logo on white background