Overview
DHCP automates IP configuration (address, mask, gateway, DNS) so clients can join a network without manual static settings. CCNA focuses on DORA, router pools, ip helper-address relay, and how DHCP ties to voice VLAN and WLC AP discovery.
What DHCP provides
DHCP (Dynamic Host Configuration Protocol) is a client/server protocol that automatically assigns hosts an IP address, subnet mask, default gateway, DNS servers, and optional parameters (domain name, NTP, TFTP for IP phones, etc.). Centralized assignment reduces manual errors, address conflicts, and admin workload.
The DORA process
When a DHCP client boots, it follows DORA:
| Step | Message | Direction | Purpose |
|---|---|---|---|
| Discover | DHCP Discover | Client → broadcast | Client seeks any DHCP server |
| Offer | DHCP Offer | Server → client | Server proposes IP and options |
| Request | DHCP Request | Client → broadcast | Client accepts one offer |
| Acknowledge | DHCP ACK | Server → client | Server confirms lease |
DHCP Discover and Request are broadcast (destination 255.255.255.255) because the client has no IP address yet. The Offer and ACK are typically unicast to the offered address once the client can receive it.
Lease lifecycle
- Clients receive a lease with an expiration time
- Before expiry, the client sends a DHCP Request to renew (often at 50% and 87.5% of lease time)
- If renewal fails, the client may release and restart DORA
Who should use DHCP?
| Device type | Typical addressing | Why |
|---|---|---|
| Desktop PCs, laptops, phones | DHCP client | Many devices; addresses can change |
| Servers, routers, switches | Static manual config | Must be reachable at known addresses; mission-critical |
Servers and infrastructure devices are not typical DHCP clients — their stability depends on fixed addresses.
Cisco router as DHCP server
A Cisco router can act as a DHCP server for directly connected subnets using an ip dhcp pool.
ip dhcp excluded-address 10.10.10.1 10.10.10.10 ! ip dhcp pool LAN-CLIENTS network 10.10.10.0 255.255.255.0 default-router 10.10.10.1 dns-server 10.10.20.10 domain-name example.com lease 7
| Command | Purpose |
|---|---|
ip dhcp excluded-address | Reserve addresses for static assignments (gateway, servers) |
network | Subnet and mask for the pool |
default-router | Default gateway (option 3) |
dns-server | DNS server(s) (option 6) |
lease | Lease duration in days (or infinite) |
show ip dhcp pool show ip dhcp binding show ip dhcp conflict clear ip dhcp binding *
DHCP relay (ip helper-address)
DHCP broadcasts do not cross routers. When the DHCP server is on a different subnet than clients, configure a DHCP relay agent on the router interface facing the clients.
interface FastEthernet0/1 description User VLAN 10 ip address 10.10.10.1 255.255.255.0 ip helper-address 10.10.20.10
The router receives client broadcasts, unicasts them to the DHCP server IP, and relays responses back. Without relay (or a server on every subnet), remote subnets cannot obtain leases.
ip helper-address also forwards other UDP broadcasts by default (TFTP, DNS, Time, NetBIOS, etc.). In security-sensitive designs, use ip forward-protocol to limit which UDP ports are relayed.
Relay topology (exam mental model)
[PC VLAN 10] --broadcast DORA--> [R1 Fa0/1 + helper-address]
|
unicast to
|
[DHCP Server 10.10.20.10]
Cisco router as DHCP client
ISPs often assign a dynamic public IP via DHCP on the WAN interface. PAT overload then shares that single address for inside hosts.
interface FastEthernet0/0 ip address dhcp no shutdown ! show dhcp lease
Common pattern: outside interface gets DHCP public IP → ip nat inside source list 1 interface Fa0/0 overload for inside users.
DHCP options (awareness)
Beyond IP/mask/gateway/DNS, DHCP options carry extra data:
| Option | Use |
|---|---|
| Option 3 | Default router (set via default-router) |
| Option 6 | DNS servers |
| Option 15 | Domain name |
| Option 43 | WLC management IP (hex-encoded) — lightweight AP auto-discovery |
| Option 150 | Cisco TFTP server (IP phone config) |
Voice VLAN / CUCME scenarios often need DHCP option 150 — see the Voice VLAN topic. Option 43 on the DHCP server helps lightweight APs find a WLC — see Wireless Configuration.
DHCPv6 (brief cross-reference)
IPv6 hosts can get addresses via SLAAC (stateless) or DHCPv6 (stateful). DHCPv6 relay uses ipv6 dhcp relay destination on interfaces. See the IPv6 topic for SLAAC vs DHCPv6.
DHCP snooping (security context)
A rogue DHCP server on the LAN can hand out malicious gateway/DNS addresses (MITM). DHCP snooping on switches builds a binding table of legitimate leases and drops unauthorized DHCP offers.
DHCP snooping is covered in depth on the Switch Security topic. Know that it exists and why — exam questions often link rogue DHCP to L2 mitigation.
Troubleshooting workflow
- Confirm the client interface is set to obtain IP automatically
- On the client:
ipconfig /releaseandipconfig /renew(Windows) ordhclient(Linux) - On the router:
show ip dhcp pool,show ip dhcp binding - For relay scenarios: verify
ip helper-addresspoints to the correct server IP - Check
ip dhcp excluded-address— is the gateway accidentally in the pool? - Verify ACLs are not blocking UDP 67/68 between client, relay, and server
Exam checklist
| Trap | Correct understanding |
|---|---|
| DORA order | Discover → Offer → Request → Acknowledge |
| Relay needed when | Server and client on different subnets |
ip helper-address | Converts broadcast to unicast toward server |
| Excluded addresses | Prevents pool from assigning gateway/server IPs |
| Infrastructure devices | Typically static, not DHCP clients |
| Rogue DHCP | Mitigate with DHCP snooping on switches |