DHCP Basics Cheat Sheet

Dynamic Host Configuration Protocol: DORA process, lease lifecycle, DHCP options, static vs dynamic assignment, and DHCP relay configuration.

Last Updated: May 1, 2025

The DORA Process

1. DISCOVER
Client broadcasts 'Is there a DHCP server?' (0.0.0.0:68 → 255.255.255.255:67)
2. OFFER
Server reserves an IP and sends offer (unicast or broadcast)
3. REQUEST
Client broadcasts 'I want this IP' (accepts one offer, rejects others)
4. ACKNOWLEDGE (ACK)
Server confirms lease with IP, mask, gateway, DNS, lease time
NAK
Server rejects request (wrong network, IP conflict) — client restarts DORA
RENEWAL (T1)
Client unicasts RENEW at 50% of lease time (directly to server)
REBIND (T2)
At 87.5% of lease, client broadcasts for any server if renewal failed

Common DHCP Options

ItemDescription
Option 1Subnet Mask (e.g., 255.255.255.0)
Option 3Default Gateway (router IP)
Option 6DNS Server(s) — primary and secondary
Option 15Domain Name (e.g., company.local)
Option 42NTP Server for time synchronization
Option 51IP Address Lease Time (seconds)
Option 66TFTP Server Name (for VoIP phone provisioning)
Option 150TFTP Server IP Address (Cisco VoIP alternative)

DHCP Relay

ItemDescription
PurposeForward DHCP broadcasts across subnets (routers don't forward broadcasts)
ip helper-addressCisco command: forward DHCP to server IP
Relay agentInserts GIADDR (Gateway IP Address) so server knows originating subnet
Agent Remote IDIdentifies the relay agent itself (Option 82)
Without relayNeed a DHCP server on every subnet (impractical at scale)

Static vs Dynamic

ItemDescription
StaticManually configured — servers, printers, network gear (consistent access)
Dynamic (DHCP)Auto-assigned from pool — workstations, IoT, guest devices
DHCP reservationMAC-based permanent lease — DHCP-managed 'static' IP
FallbackAPIPA (169.254.x.x) when DHCP is unreachable — link-local only
Lease file/var/lib/dhcp/dhcpd.leases — ISC DHCP server lease database
Pro Tip: DHCP DORA mnemonic: Discover → Offer → Request → Acknowledge. The client broadcasts Discover; the server offers; client requests; server acknowledges with a lease.