📘 03-04: DHCP¶
❓ What Is DHCP?¶
DHCP (Dynamic Host Configuration Protocol) automatically leases IP configuration to clients, eliminating manual (static) setup on each host.
It provides: - IP address - Subnet mask - Default gateway - DNS server(s) - (Optionally) NTP, domain name, and more
Ports: server UDP 67, client UDP 68.
📌 The DORA Process¶
1. DISCOVER — client broadcasts "any DHCP servers?"
2. OFFER — server offers an available address
3. REQUEST — client requests the offered address
4. ACK — server confirms the lease
Mnemonic: D-O-R-A.
📌 Scope Concepts¶
| Term | Meaning |
|---|---|
| Scope | The range of addresses a server can hand out |
| Reservation | Binds a specific MAC to always get the same IP |
| Exclusion | Addresses kept out of the pool (for static devices) |
| Lease time | How long a client keeps its address |
🧮 DHCP Across Subnets: Relay¶
DHCP Discover is a broadcast confined to its VLAN/subnet. To use a central DHCP server on another subnet, configure a DHCP relay (ip helper-address) on the router/L3 switch to forward requests as unicast.
📡 When DHCP Fails¶
A host that can't reach a DHCP server self-assigns an APIPA address (169.254.x.x) — a telltale sign of a DHCP/connectivity problem.
Tip
Key idea — DHCP automates IP config via DORA (ports 67/68). Use reservations for consistent device addresses and a DHCP relay to serve clients across subnets. APIPA (169.254.x.x) = DHCP failed.
See also: IPv4 Addressing, Virtual LAN (VLAN)
Previous: IPv6 Addressing | All Notes | Module 03 Exercise | Next: DNS