📘CCNP Enterprise – ENARSI (300-410)
DHCP (Dynamic Host Configuration Protocol) is critical in IT networks. It automatically assigns IP addresses and other network settings (like default gateway, DNS) to devices. For Cisco exams, you need to understand how DHCP works, how to configure it on IOS devices, and how to troubleshoot it.
This section covers:
- DHCP Client
- IOS DHCP Server
- DHCP Relay
- DHCP Options
- Troubleshooting Steps & Commands
1. DHCP Client
A DHCP client is any device that requests an IP address from a DHCP server.
Key Points:
- Devices like PCs, servers, or routers can act as DHCP clients.
- They send a DHCPDISCOVER message to find a DHCP server.
- Server replies with DHCPOFFER, and then the client sends DHCPREQUEST.
- Server finalizes with DHCPACK (acknowledgment) with IP info.
IPv4 vs IPv6:
- IPv4: Traditional DHCP (DHCPv4) works as explained above.
- IPv6: DHCPv6 is slightly different:
- Clients can use stateless (only get DNS) or stateful (get IP and other info) DHCPv6.
- Messages: SOLICIT → ADVERTISE → REQUEST → REPLY.
Common Issues:
- Client does not get an IP → check interface status and DHCP server connectivity.
- Wrong subnet → client may be connected to a VLAN without DHCP server support.
- Lease issues → previous IP leases can cause conflicts.
Useful Commands (on Cisco IOS):
# Check IP address on client interface
show ip interface brief # IPv4
show ipv6 interface brief # IPv6
# Force client to request new DHCP IP
ip address dhcp
ipv6 address dhcp
2. IOS DHCP Server
A Cisco router or switch can act as a DHCP server.
Key Points:
- Assigns IP addresses to clients automatically.
- Can provide additional information via DHCP options (default gateway, DNS, domain name, TFTP, etc.).
- Can manage IPv4 and IPv6 leases.
IPv4 Server Configuration Example:
# Step 1: Create a DHCP pool
ip dhcp pool LAN_POOL
network 192.168.10.0 255.255.255.0
default-router 192.168.10.1
dns-server 8.8.8.8 8.8.4.4
lease 7 # 7-day lease
IPv6 Server Configuration Example:
ipv6 dhcp pool LAN_V6
address prefix 2001:db8:1::/64
dns-server 2001:4860:4860::8888
Common Issues:
- DHCP pool exhausted → no IP left to assign.
- Wrong subnet → clients get IP from wrong network.
- Conflicting IPs → static IPs overlap with DHCP range.
- Incorrect default gateway → clients cannot reach outside network.
Troubleshooting Commands:
show ip dhcp binding # See IPv4 addresses leased
show ip dhcp pool # Check pool utilization
show ipv6 dhcp binding # IPv6 addresses leased
3. DHCP Relay
DHCP relay is used when clients and DHCP server are on different networks/VLANs.
How it Works:
- Client sends DHCPDISCOVER → broadcast (cannot cross routers by default).
- Router configured as DHCP relay agent forwards this to DHCP server (unicast).
- Server replies → router forwards response back to client.
Configuration Example (IPv4):
interface GigabitEthernet0/1
ip address 192.168.10.1 255.255.255.0
ip helper-address 192.168.20.100 # DHCP server IP
Configuration Example (IPv6):
interface GigabitEthernet0/1
ipv6 dhcp relay destination 2001:db8:1::1
Common Issues:
- No ip helper-address → client cannot reach server.
- Wrong IP in helper-address → relayed messages fail.
- Relay traffic blocked by ACL → DHCP messages dropped.
Troubleshooting Commands:
show ip interface # Verify helper-address
debug ip dhcp server events # Monitor DHCP server activity
debug ip dhcp relay # Track relay messages
4. DHCP Options
DHCP options provide additional network info to clients.
Examples:
- Option 3 → Default gateway
- Option 6 → DNS server
- Option 15 → Domain name
- Option 66 → TFTP server
- Option 150 → Cisco TFTP server
IPv6 Options:
- DNS server
- Domain search list
- SIP server
Troubleshooting Options:
- Missing options → clients get IP but cannot reach network services.
- Wrong option values → misconfigured gateway, DNS, or TFTP.
5. Troubleshooting DHCP Step-by-Step
Step 1: Verify Connectivity
- Ping server from relay/router.
- Ensure interface is up.
Step 2: Verify Client Configuration
ipconfig /allon PCshow ip interface briefon router
Step 3: Verify Server Configuration
show ip dhcp pool- Check lease availability
- Ensure correct network/subnet
Step 4: Verify Relay (if used)
show ip interface→ verify helper-addressdebug ip dhcp relay
Step 5: Check Logs
- Enable debug on server for detailed info:
debug ip dhcp server events
debug ip dhcp server packet
Step 6: Solve Common Problems
| Problem | Likely Cause | Fix |
|---|---|---|
| Client no IP | Server down, helper missing, VLAN mismatch | Check server & relay |
| Wrong IP | Pool misconfigured | Correct DHCP pool |
| No DNS / gateway | DHCP options missing | Configure proper options |
| IP conflicts | Static IP overlap or wrong lease | Adjust pool or static IPs |
Exam Tips
- Remember DHCP sequence (Discover → Offer → Request → ACK) for IPv4 and IPv6.
- Know key commands (
show ip dhcp binding,show ip dhcp pool,debug ip dhcp server). - Understand relay configuration and why it is needed.
- Recognize common mistakes: pool exhaustion, wrong helper address, wrong options.
- Be able to troubleshoot both IPv4 and IPv6 DHCP scenarios.
