Capstone Project 4 — Configure a DHCP Server¶
In this capstone project, you'll build a production-ready DHCP (Dynamic Host Configuration Protocol) server that automatically assigns IP addresses and network configuration to client devices. You'll configure DHCP scopes, reservations, lease times, multiple subnets, DHCP relay, and integrate DHCP with DNS. DHCP is one of the most important infrastructure services because it automates network configuration and simplifies device management. Every Network Engineer, DevOps Engineer, Platform Engineer, Cloud Engineer, and System Administrator should understand how to deploy and manage DHCP services.
Learning Path¶
Course Progress
Project Objectives¶
By completing this project, you'll be able to:
- Deploy a Linux DHCP server
- Configure DHCP scopes
- Create IP reservations
- Configure lease times
- Support multiple VLANs and subnets
- Integrate DHCP with DNS
- Troubleshoot DHCP issues
Skills Covered¶
This project combines concepts from:
- DHCP
- IP Addressing
- DNS
- VLANs
- Routing
- Linux Networking
- Firewalls
- Network Troubleshooting
Project Scenario¶
Currently, every workstation is configured manually.
Problems include:
- IP conflicts
- Incorrect gateway settings
- DNS configuration errors
- High administrative effort
Your task is to automate IP address assignment using DHCP.
Target Architecture¶
Internet
│
Router
│
Core Switch
│
┌─────────────┴─────────────┐
│ │
DHCP Server Client Devices
│
DNS Server
Clients automatically receive network configuration.
Lab Requirements¶
Software:
- Ubuntu Server LTS
- Debian
- Rocky Linux
Recommended:
- Ubuntu Server LTS
Network Design¶
| Device | IP Address |
|---|---|
| DHCP Server | 192.168.20.10 |
| DNS Server | 192.168.20.20 |
| Gateway | 192.168.20.1 |
| Clients | Dynamic |
Step 1 — Install DHCP Server¶
Ubuntu:
Verify installation.
Step 2 — Configure Network Interface¶
Identify interface:
Configure DHCP service to listen on:
(or your active interface)
Step 3 — Configure DHCP Scope¶
Example subnet:
DHCP Pool:
Reserved addresses remain available for servers and infrastructure.
Step 4 — Configure Gateway¶
Default gateway:
Clients automatically receive the correct gateway.
Step 5 — Configure DNS¶
Provide:
Clients automatically use the internal DNS server.
Step 6 — Configure Domain Name¶
Example:
Clients receive:
for internal name resolution.
Step 7 — Configure Lease Time¶
Example:
Default Lease:
Maximum Lease:
Lease durations should balance network efficiency and address availability.
Step 8 — Restart DHCP Service¶
Verify:
Step 9 — Configure Client¶
Release current lease:
Request a new lease:
Verify:
Step 10 — Verify Assigned Configuration¶
Check:
- IP Address
- Gateway
- DNS Server
- Lease Duration
Verify connectivity.
Step 11 — Configure DHCP Reservation¶
Reserve an address for a server.
Example:
Critical systems should receive consistent IP addresses.
Step 12 — Configure Multiple Subnets¶
Example:
| VLAN | Network |
|---|---|
| Users | 192.168.10.0/24 |
| Servers | 192.168.20.0/24 |
| DevOps | 192.168.30.0/24 |
| Guest | 192.168.40.0/24 |
Create a DHCP scope for each subnet.
Step 13 — Configure DHCP Relay¶
When DHCP server and clients are on different VLANs:
The relay forwards DHCP requests across routed networks.
Step 14 — Configure Firewall¶
Allow DHCP traffic.
Ports:
| Protocol | Port |
|---|---|
| UDP | 67 |
| UDP | 68 |
Verify clients can communicate with the server.
Step 15 — Verify Logs¶
View logs:
Confirm:
- Lease Requests
- Lease Assignments
- Errors
- Service Startup
Enterprise DHCP Architecture¶
Large organizations commonly centralize DHCP services.
DHCP and DNS Integration¶
Workflow:
This enables automatic hostname registration.
Security Improvements¶
Implement:
- DHCP Reservations for Critical Systems
- DHCP Snooping
- Restrict Unauthorized DHCP Servers
- Firewall Protection
- Logging
- Backup DHCP Configuration
Validation Checklist¶
| Item | Status |
|---|---|
| DHCP Installed | ☐ |
| Scope Configured | ☐ |
| Gateway Configured | ☐ |
| DNS Configured | ☐ |
| Lease Times Configured | ☐ |
| Client Receives Address | ☐ |
| Reservation Tested | ☐ |
| Firewall Updated | ☐ |
| Logs Verified | ☐ |
| Documentation Updated | ☐ |
Common Problems¶
| Problem | Solution |
|---|---|
| No IP Assigned | Verify DHCP Service |
| Incorrect Gateway | Check Scope Configuration |
| DNS Missing | Verify DHCP Options |
| Duplicate IP | Review Reservations |
| Cross-VLAN Failure | Verify DHCP Relay |
Troubleshooting Commands¶
Check interface.
Restart DHCP.
View logs.
Renew lease.
Release lease.
Bonus Challenges¶
Extend the project by:
- Configuring High Availability DHCP
- Deploying DHCP Failover
- Integrating with Active Directory
- Automating DHCP Configuration
- Deploying Multiple DHCP Servers
- Monitoring DHCP Leases with Prometheus
- Implementing DHCP Snooping on Switches
Learning Outcomes¶
After completing this project, you'll be able to:
- Deploy enterprise DHCP infrastructure
- Configure multiple DHCP scopes
- Create IP reservations
- Integrate DHCP with DNS
- Configure DHCP relay
- Troubleshoot DHCP services
Project Deliverables¶
By the end of this project, you should have:
- Working DHCP Server
- DHCP Scope
- Gateway Configuration
- DNS Configuration
- Lease Policies
- Static Reservations
- DHCP Relay (Optional)
- Firewall Rules
- Documentation
Self-Assessment¶
Before moving to the next project, confirm:
- Can you install and configure a DHCP server?
- Can you create DHCP scopes?
- Can you configure lease durations?
- Can you configure DHCP reservations?
- Can you support multiple VLANs?
- Can you troubleshoot DHCP issues?
- Can you document the DHCP infrastructure?
Summary¶
In this capstone project, you deployed a production-ready DHCP server and automated IP address assignment for client systems. You configured DHCP scopes, reservations, lease policies, DNS integration, multiple subnets, and DHCP relay while validating client connectivity and service availability.
This project reflects real-world enterprise environments where DHCP automates network configuration, reduces administrative overhead, and ensures consistent, scalable IP address management.
Key Takeaways¶
- DHCP automates IP address assignment and client network configuration.
- Configure separate DHCP scopes for each subnet or VLAN.
- Use reservations for servers, printers, and network infrastructure.
- Deploy DHCP relay when clients and servers are separated by routers.
- Integrate DHCP with DNS for seamless hostname resolution.
- Protect DHCP infrastructure with logging, firewall rules, and DHCP snooping where supported.
What's Next?¶
In the next capstone project, you'll learn how to Build a VPN Server.
You'll deploy a secure remote access VPN using Linux, configure encrypted tunnels, manage user authentication, implement firewall rules, enable secure access to internal resources, and troubleshoot VPN connectivity in a production-style environment.