DEV Community

Cover image for DHCP Explained — Quick Leases, DORA, and Troubleshooting Cheatsheet
Long Nguyen
Long Nguyen

Posted on

DHCP Explained — Quick Leases, DORA, and Troubleshooting Cheatsheet

DHCP explained: a compact, practical guide for engineers and sysadmins who need to understand how devices get IPs and why that sometimes fails.

Why this matters

  • DHCP hands out IP leases and important settings (gateway, DNS). Misconfigurations cause APIPA addresses, scope exhaustion, or unreachable clients.

Core concepts (at-a-glance)

  • Roles: client (requests), server (offers/tracks leases), relay/agent (forwards broadcasts across subnets).
  • DORA: Discover → Offer → Request → Acknowledge. Uses UDP ports 67 (server) and 68 (client).
  • Leases: temporary IP assignments with renew timers (T1/T2) so addresses can be reused safely.
  • Common options: default gateway (router), DNS servers, domain name, NTP, etc.

Fast troubleshooting checklist

  1. Client shows APIPA (169.254.x.x)? Check reachability to DHCP server and relay/agent (ip helper-address).
  2. Scope exhaustion? Inspect lease table and excluded ranges; consider shortening lease time for busy networks.
  3. IP conflicts? Look for duplicate static assignments or rogue DHCP servers.
  4. Relays and VLANs: ensure helper addresses point to the right DHCP server and ACLs allow UDP 67/68.
  5. Server-side logs: watch for offers, requests, and NAKs to pinpoint failures.

Want the full walkthrough with examples, T1/T2 timing, and step-by-step fixes? Read the full guide on Netalith

Top comments (0)