DHCP lease management is a critical but often overlooked aspect of network administration. The DHCP lease database tracks which IP addresses are assigned to which devices, when leases expire, and what options were provided. For network administrators, having visibility into lease data is essential for troubleshooting connectivity issues, planning IP address allocation, detecting unauthorized devices, and auditing network usage.
In this guide, we compare three leading DHCP server implementations and their lease management capabilities: Kea DHCP, ISC DHCP, and Dnsmasq. We cover lease database formats, lease analysis tools, monitoring integrations, and best practices for managing DHCP leases at scale.
For related reading, see our network discovery agents guide and IPv6 neighbor discovery guide.
Understanding DHCP Lease Management
What Is a DHCP Lease?
When a device connects to a network, the DHCP server assigns it an IP address from a configured pool. This assignment is called a “lease” — it has a specific duration (lease time) after which the client must renew or the address returns to the pool. The lease database tracks:
- MAC address — Hardware identifier of the client
- Assigned IP — The IP address leased to the client
- Lease start time — When the lease was granted
- Lease expiry — When the lease expires
- Hostname — Client-provided hostname (if any)
- Client ID — DHCP client identifier option
- Lease state — Active, expired, or released
Why Lease Management Matters
- Troubleshooting — Quickly identify which device holds a specific IP address
- Capacity planning — Monitor lease pool utilization to prevent address exhaustion
- Security auditing — Detect unauthorized or rogue devices on the network
- Compliance — Maintain records of network access for regulatory requirements
- IPAM integration — Feed lease data into IP address management systems
Kea DHCP Lease Management
Kea DHCP is the modern DHCP server from ISC (Internet Systems Consortium), designed as the successor to the legacy ISC DHCP server. It features a REST API, hookable architecture, and support for multiple backends.
Kea Lease Backends
Kea supports multiple lease database backends:
- Memfile — In-memory with flat-file persistence (default)
- MySQL — Relational database for large-scale deployments
- PostgreSQL — Full-featured relational backend
- CQL (Cassandra) — Distributed database for carrier-scale deployments
Kea Configuration with MySQL Backend
| |
Kea Lease Queries (MySQL)
| |
Kea REST API for Lease Management
| |
Kea DHCP Docker Compose
| |
ISC DHCP Lease Management
ISC DHCP (dhcpcd) is the legacy DHCP server that served as the industry standard for decades. While ISC has deprecated it in favor of Kea, many organizations still run ISC DHCP in production.
ISC DHCP Lease File Format
ISC DHCP stores leases in a human-readable text file:
| |
Parsing ISC DHCP Leases
| |
ISC DHCP Docker Compose
| |
Dnsmasq Lease Management
Dnsmasq is a lightweight DNS and DHCP server popular in small networks, home labs, and embedded systems. Its lease management is simpler but sufficient for smaller deployments.
Dnsmasq Lease File Format
| |
Dnsmasq Configuration
| |
Dnsmasq Lease Analysis
| |
Dnsmasq Docker Compose
| |
DHCP Lease Management Comparison
| Feature | Kea DHCP | ISC DHCP | Dnsmasq |
|---|---|---|---|
| Lease Backend | MySQL, PostgreSQL, CQL, Memfile | Text file | Text file |
| REST API | Yes (control agent) | No | No |
| Lease Query | SQL + API commands | File parsing | File parsing |
| Lease Analytics | Built-in statistics | Manual | Manual |
| IPv4 + IPv6 | Separate daemons | Separate daemons | Single daemon |
| DHCPv6 | Full support | Full support | Limited |
| Hook System | Yes (C++/Python) | No | No |
| Scale | Carrier-grade | Enterprise | Small/home |
| Active Development | Yes (ISC) | Deprecated | Yes |
| Docker Image | Official (isc/kea) | Community | Community (jpillora) |
Choosing the Right DHCP Server
Choose Kea DHCP when:
- You need programmatic lease access via REST API or SQL queries
- You’re managing hundreds or thousands of leases
- You need integration with IPAM systems
- You require carrier-grade performance and reliability
- You want active development and modern architecture
Choose ISC DHCP when:
- You have existing infrastructure and configurations
- You need a proven, stable solution for medium-sized networks
- You prefer human-readable lease files for manual inspection
- You’re not ready to migrate to Kea
Choose Dnsmasq when:
- You’re managing a small network (under 100 devices)
- You need DNS and DHCP in a single lightweight daemon
- You’re running on resource-constrained hardware (Raspberry Pi, embedded)
- You prefer simplicity over advanced features
Why Self-Host DHCP with Lease Management?
Running your own DHCP server with proper lease management gives you complete visibility into network device assignment. Unlike cloud-managed DHCP services, self-hosted solutions keep all lease data within your infrastructure and provide deep integration with monitoring, IPAM, and security systems.
Network visibility: The DHCP lease database is a real-time map of every device on your network. By querying lease data, you can instantly identify which device holds a specific IP, when it connected, and whether it’s expected. This is invaluable for troubleshooting connectivity issues and detecting unauthorized devices.
Security auditing: DHCP lease logs provide a historical record of network access. By analyzing lease data over time, you can detect anomalies such as devices requesting addresses outside normal hours, MAC address spoofing patterns, or sudden spikes in lease requests that might indicate a DHCP starvation attack.
IPAM integration: Kea’s MySQL/PostgreSQL backends enable direct integration with IP address management tools. Lease data can feed into dashboards showing pool utilization, lease duration trends, and device inventory — essential for network capacity planning and compliance reporting.
For related reading, see our network access control guide and DNS failover guide.
FAQ
What is a DHCP lease and how long does it last?
A DHCP lease is a temporary assignment of an IP address to a network device. The lease duration is configured on the DHCP server and typically ranges from 1 hour to 24 hours. When the lease expires, the device must renew it or the IP address returns to the available pool.
How do I view active DHCP leases?
For Kea DHCP with MySQL backend, query the lease4 table with SQL. For ISC DHCP, parse the /var/lib/dhcp/dhcpd.leases text file. For Dnsmasq, read /var/lib/misc/dnsmasq.leases. Kea also provides a REST API for lease queries.
Can I change a DHCP lease without restarting the server?
Kea DHCP supports dynamic lease manipulation via its REST API — you can add, delete, and modify leases without restarting. ISC DHCP and Dnsmasq require manual editing of the lease file followed by a server reload (kill -HUP).
What happens when the DHCP lease pool is exhausted?
When all available IP addresses are leased, new clients cannot obtain an IP address. Kea DHCP logs this condition and can send alerts. To prevent exhaustion, reduce lease times, expand the address pool, or implement DHCP snooping to prevent lease abuse.
How do I monitor DHCP lease utilization?
Kea DHCP has built-in statistics accessible via the control agent API. For ISC DHCP and Dnsmasq, you can parse the lease file and calculate the ratio of active leases to total pool size. Tools like Prometheus + dhcp_exporter can export lease metrics for dashboard visualization.
Is ISC DHCP still supported?
ISC DHCP is deprecated. ISC recommends migrating to Kea DHCP, which is actively developed and supported. Kea provides a migration path from ISC DHCP configurations and lease databases. While ISC DHCP still works, it receives only critical security fixes.