3.4. The Kea lease database
A DHCP lease is the period for which Kea allocates a network address to a client. The lease databases contain information about the allocated leases, such as the IP address assigned to a media access control (MAC) address or the timestamp when the lease expires.
All timestamps in the lease databases are in Coordinated Universal Time (UTC).
Kea supports the following lease backends:
memfile(default)A text-based file stored on the disk. By default, Kea stores the DHCP leases in the following files:
-
For DHCPv4:
/var/lib/kea/kea-leases4.csv For DHCPv6:
/var/lib/kea/kea-leases6.csv주의Manually updating the files can cause inconsistencies and file corruption. For performance reasons, Kea stores the lease data in memory and does not monitor the lease files during runtime. Manual edits can be overridden the next time Kea updates the files.
-
For DHCPv4:
mysql- A MySQL database backend.
pgsql- A PostgreSQL database backend.
For example, Kea updates the lease database in the following cases:
- On lease updates
- On graceful shutdown
- During periodic lease file cleanup (LFC) processes
- By requests through the API