DHCP database

The db_file.dhcpo database is used to track clients and addresses and for access control (for example, allowing certain clients on some networks but not others, or disabling BOOTP clients on a particular network).

Options are also stored in the database for retrieval and delivery to clients. The database is implemented as a dynamically loadable object, which allows for easy server upgrade and maintenance.

Using the information in the configuration file, the database is primed and verified for consistency. A set of checkpoint files handles updates to the database and reduces the overhead of writes to the main storage file. The database also contains the address and option pools, but these are static and are discussed in DHCP configuration.

The main storage file and its back up are flat ASCII files that can be edited. The format for the database main storage files are:

DF01
"CLIENT ID" "0.0.0.0" State LeaseTimeStart LeaseTimeDuration LeaseTimeEnd
  "Server IP Address" "Class ID" "Vendor ID" "Hostname" "Domain Name"
"CLIENT ID" "0.0.0.0" State LeaseTimeStart LeaseTimeDuration LeaseTimeEnd
  "Server IP Address" "Class ID" "Vendor ID" "Host Name" "Domain Name"
...

The first line is a version identifier for the file: DF01c. The lines that follow are client record definition lines. The server reads from the second line to the end of the file. (The parameters in quotes must be enclosed in quotes.)

"CLIENT ID"
The ID the client uses to represent itself to the server.
"0.0.0.0"
is the IP address currently assigned to the DHCP server. If no address has been assigned, it is "0.0.0.0".
State
The current state of the client. The DHCP protocol engine contains the allowable set, and the states are maintained in the DHCP database. The number next to State represents its value. The states can be:
(1) FREE
Represents addresses that are available for use. In general, clients do not have this state unless they have no address assigned. dadmin and the output from lssrc report this state as Free.
(2) BOUND
Indicates client and address are tied and that the client has been assigned this address for some amount of time. dadmin and the output from lssrc report this state as Leased.
(3) EXPIRED
Indicates the client and address are tied together, but only for informational purposes, in a similar manner to released addresses. The expired state, however, represents clients that let their leases expire. An expired address is available for use and is reassigned after all free addresses are unavailable and before released addresses are reassigned. dadmin and the output from lssrc report this state as Expired.
(4) RELEASED
Indicates the client and address are tied for informational purposes only. The DHCP protocol suggests that DHCP servers maintain information about the clients it has served for future reference (mainly to try giving the same address to that client that has been assigned that address in the past). This state indicates that the client has released the address. The address is available for use by other clients, if no other addresses are available. dadmin and the output from lssrc report this as Released.
(5) RESERVED
Indicates client and address are tied, but loosely. The client has issued a DHCP discover message and the DHCP server has responded, but the client has not yet responded with a DHCP request for that address. dadmin and the output from lssrc report this state as Reserved.
(6) BAD
Represents an address that is in use in the network but has not been handed out by the DHCP server. This state also represents addresses that clients have rejected. This state does not apply to clients. dadmin and the output from lssrc report this state as Used and Bad, respectively.
LeaseTimeStart
Is the start of the current lease time (in the number of seconds since January 1, 1970).
LeaseTimeDuration
Represents the duration of the lease (in seconds).
LeaseTimeEnd
Uses the same format as LeaseTimeStart, but it represents the end of the lease. Some configuration options use different values for the start and end of a lease and these values can be overridden by configuration file options. See DHCP server file syntax for db_file database.
"Server IP Address"
Is the IP address of the DHCP server that owns this record.
"Class ID" "Vendor ID" "Host Name" "Domain Name"
Values that the server uses to determine which options are sent to the server (stored as quoted strings). These parameters increase performance because option lists can be pregenerated for these clients when the DHCP server starts up.