dhcpd.leases(5)                                                dhcpd.leases(5)



[1mNAME[0m
       dhcpd.leases - DHCP client lease database

[1mDESCRIPTION[0m
       The Internet Systems Consortium DHCP Server keeps a persistent database
       of leases that it has assigned.  This database is a free-form ASCII
       file containing a series of lease declarations.  Every time a lease is
       acquired, renewed or released, its new value is recorded at the end of
       the lease file.  So if more than one declaration appears for a given
       lease, the last one in the file is the current one.

       When dhcpd is first installed, there is no lease database.   However,
       dhcpd requires that a lease database be present before it will start.
       To make the initial lease database, just create an empty file called
       /var/db/dhcpd.leases.   You can do this with:

            touch /var/db/dhcpd.leases

       In order to prevent the lease database from growing without bound, the
       file is rewritten from time to time.   First, a temporary lease
       database is created and all known leases are dumped to it.   Then, the
       old lease database is renamed /var/db/dhcpd.leases~.   Finally, the
       newly written lease database is moved into place.

[1mFORMAT[0m
       Lease descriptions are stored in a format that is parsed by the same
       recursive descent parser used to read the [1mdhcpd.conf(5) [22mand
       [1mdhclient.conf(5) [22mfiles.  Lease files can contain lease declarations,
       and also group and subgroup declarations, host declarations and
       failover state declarations.  Group, subgroup and host declarations are
       used to record objects created using the OMAPI protocol.

       The lease file is a log-structured file - whenever a lease changes, the
       contents of that lease are written to the end of the file.   This means
       that it is entirely possible and quite reasonable for there to be two
       or more declarations of the same lease in the lease file at the same
       time.   In that case, the instance of that particular lease that
       appears last in the file is the one that is in effect.

       Group, subgroup and host declarations in the lease file are handled in
       the same manner, except that if any of these objects are deleted, a
       [4mrubout[24m is written to the lease file.   This is just the same
       declaration, with [1m{ deleted; } [22min the scope of the declaration.   When
       the lease file is rewritten, any such rubouts that can be eliminated
       are eliminated.   It is possible to delete a declaration in the
       [1mdhcpd.conf [22mfile; in this case, the rubout can never be eliminated from
       the [1mdhcpd.leases [22mfile.

[1mTHE LEASE DECLARATION[0m
       [1mlease [4m[22mip-address[24m [1m{ [4m[22mstatements...[24m [1m}[0m

       Each lease declaration includes the single IP address that has been
       leased to the client.   The statements within the braces define the
       duration of the lease and to whom it is assigned.

       [1mstarts [4m[22mdate[24m[1m;[0m
       [1mends [4m[22mdate[24m[1m;[0m
       [1mtstp [4m[22mdate[24m[1m;[0m
       [1mtsfp [4m[22mdate[24m[1m;[0m

       The start and end time of a lease are recorded using the [1mstarts [22mand
       [1mends [22mstatements.   The [1mtstp [22mstatement is specified if the failover
       protocol is being used, and indicates what time the peer has been told
       the lease expires.   The [1mtsfp [22mstatement is also specified if the
       failover protocol is being used, and indicates the lease expiry time
       that the peer has acknowledged.

       The [4mdate[24m is specified in two ways, depending on the configuration value
       for the [1mdb-time-format [22mparameter.  If it was set to [4mdefault[24m, then the
       [4mdate[24m fields appear as follows:

       [4mweekday[24m [4myear[24m[1m/[4m[22mmonth[24m[1m/[4m[22mday[24m [4mhour[24m[1m:[4m[22mminute[24m[1m:[4m[22msecond[0m

       The weekday is present to make it easy for a human to tell when a lease
       expires - it's specified as a number from zero to six, with zero being
       Sunday.  The day of week is ignored on input.  The year is specified
       with the century, so it should generally be four digits except for
       really long leases.  The month is specified as a number starting with 1
       for January.  The day of the month is likewise specified starting with
       1.  The hour is a number between 0 and 23, the minute a number between
       0 and 59, and the second also a number between 0 and 59.

       Lease times are specified in Universal Coordinated Time (UTC), not in
       the local time zone.  There is probably nowhere in the world where the
       times recorded on a lease are always the same as wall clock times.  On
       most unix machines, you can display the current time in UTC by typing
       [1mdate -u[22m.

       If the [1mdb-time-format [22mwas configured to [4mlocal[24m, then the [4mdate[24m fields
       appear as follows:

        [1mepoch [4m[22m<seconds-since-epoch>[24m[1m; # [4m[22m<day-name>[24m [4m<month-name>[24m [4m<day-number>[0m
       [4m<hours>[24m[1m:[4m[22m<minutes>[24m[1m:[4m[22m<seconds>[24m [4m<year>[0m

       The [4mseconds-since-epoch[24m is as according to the system's local clock
       (often referred to as "unix time").  The [1m# [22msymbol supplies a comment
       that describes what actual time this is as according to the system's
       configured timezone, at the time the value was written.  It is provided
       only for human inspection.

       If a lease will never expire, [4mdate[24m is [1mnever [22minstead of an actual date.

       [1mhardware [4m[22mhardware-type[24m [4mmac-address[24m[1m;[0m

       The hardware statement records the MAC address of the network interface
       on which the lease will be used.   It is specified as a series of
       hexadecimal octets, separated by colons.

       [1muid [4m[22mclient-identifier[24m[1m;[0m

       The [1muid [22mstatement records the client identifier used by the client to
       acquire the lease.   Clients are not required to send client
       identifiers, and this statement only appears if the client did in fact
       send one.   Client identifiers are normally an ARP type (1 for
       ethernet) followed by the MAC address, just like in the [1mhardware[0m
       [4mstatement,[24m [4mbut[24m [4mthis[24m [4mis[24m [4mnot[24m [4mrequired.[0m

       The client identifier is recorded as a colon-separated hexadecimal list
       or as a quoted string.   If it is recorded as a quoted string and it
       contains one or more non-printable characters, those characters are
       represented as octal escapes - a backslash character followed by three
       octal digits.

       [1mclient-hostname [4m[22mhostname[24m [1m;[0m

       Most DHCP clients will send their hostname in the [4mhost-name[24m option.  If
       a client sends its hostname in this way, the hostname is recorded on
       the lease with a [1mclient-hostname [22mstatement.   This is not required by
       the protocol, however, so many specialized DHCP clients do not send a
       host-name option.

       [1mabandoned;[0m

       The [1mabandoned [22mstatement indicates that the DHCP server has abandoned
       the lease.   In that case, the [1mabandoned [22mstatement will be used to
       indicate that the lease should not be reassigned.  Please see the
       [1mdhcpd.conf(5) [22mmanual page for information about abandoned leases.

       [1mbinding state [4m[22mstate[24m[1m; next binding state [4m[22mstate[24m[1m;[0m

       The [1mbinding state [22mstatement declares the lease's binding state.  When
       the DHCP server is not configured to use the failover protocol, a
       lease's binding state will be either [1mactive [22mor [1mfree[22m.   The failover
       protocol adds some additional transitional states, as well as the
       [1mbackup [22mstate, which indicates that the lease is available for
       allocation by the failover secondary.

       The [1mnext binding state [22mstatement indicates what state the lease will
       move to when the current state expires.   The time when the current
       state expires is specified in the [4mends[24m statement.

       [1moption agent.circuit-id [4m[22mstring[24m; [1moption agent.remote-id [4m[22mstring[24m;

       The [1moption agent.circuit-id [22mand [1moption agent.remote-id [22mstatements are
       used to record the circuit ID and remote ID options send by the relay
       agent, if the relay agent uses the [4mrelay[24m [4magent[24m [4minformation[24m [4moption[24m.
       This allows these options to be used consistently in conditional
       evaluations even when the client is contacting the server directly
       rather than through its relay agent.

       [1mset [4m[22mvariable[24m [1m= [4m[22mvalue[24m[1m;[0m

       The [1mset [22mstatement sets the value of a variable on the lease.  For
       general information on variables, see the [1mdhcp-eval(5) [22mmanual page.

       [1mThe [4m[22mddns-text[24m [1mvariable[0m

       The [4mddns-text[24m variable is used to record the value of the client's TXT
       identification record when the interim ddns update style has been used
       to update the DNS for a particular lease.

       [1mThe [4m[22mddns-fwd-name[24m [1mvariable[0m

       The [4mddns-fwd-name[24m [1mvariable records the value of the name used in[0m
       [1mupdating the client's A record if a DDNS update has been successfully[0m
       [1mdone by the server.   The server may also have used this name to update[0m
       [1mthe client's PTR record.[0m

       [1mThe [4m[22mddns-client-fqdn[24m [1mvariable[0m

       If the server is configured to use the interim ddns update style, and
       is also configured to allow clients to update their own fqdns, and the
       client did in fact update its own fqdn, then the [4mddns-client-fqdn[0m
       variable records the name that the client has indicated it is using.
       This is the name that the server will have used to update the client's
       PTR record in this case.

       [1mThe [4m[22mddns-rev-name[24m [1mvariable[0m

       If the server successfully updates the client's PTR record, this
       variable will record the name that the DHCP server used for the PTR
       record.   The name to which the PTR record points will be either the
       [4mddns-fwd-name[24m or the [4mddns-client-fqdn[24m.

       [1mon [4m[22mevents[24m [1m{ [4m[22mstatements...[24m [1m} [22mThe [1mon [4m[22mstatement[24m [4mrecords[24m [4ma[24m [4mlist[24m [4mof[0m
       [4mstatements[24m [4mto[24m [4mexecute[24m [4mif[24m [4ma[24m [4mcertain[24m [4mevent[24m [4moccurs.[24m   [4mThe[24m [4mpossible[24m [4mevents[0m
       [4mthat[24m [4mcan[24m [4moccur[24m [4mfor[24m [4man[24m [4mactive[24m [4mlease[24m [4mare[24m [1mrelease [22mand [1mexpiry[22m.   More than
       one event can be specified - if so, the events are separated by '|'
       characters.

       [1mbootp; reserved; [22mThese two statements are effectively flags.  If
       present, they indicate that the BOOTP and RESERVED failover flags,
       respectively, should be set.  BOOTP and RESERVED dynamic leases are
       treated differently than normal dynamic leases, as they may only be
       used by the client to which they are currently allocated.

[1mTHE FAILOVER PEER STATE DECLARATION[0m
       The state of any failover peering arrangements is also recorded in the
       lease file, using the [1mfailover peer [22mstatement:

       [1mfailover peer [4m[22mname[24m [1mstate {[0m
       [1mmy state [4m[22mstate[24m [1mat [4m[22mdate[24m[1m;[0m
       [1mpeer state [4m[22mstate[24m [1mat [4m[22mdate[24m[1m;[0m
       [1m}[0m

       The states of the peer named [4mname[24m is being recorded.   Both the state
       of the running server ([1mmy state[22m) and the other failover partner ([4mpeer[0m
       [4mstate[24m) are recorded.   The following states are possible: [1munknown-[0m
       [1mstate[22m, [1mpartner-down[22m, [1mnormal[22m, [1mcommunications-interrupted[22m, [1mresolution-[0m
       [1minterrupted[22m, [1mpotential-conflict[22m, [1mrecover[22m, [1mrecover-done[22m, [1mshutdown[22m,
       [1mpaused[22m, and [1mstartup[22m.  [1m/var/db/dhcpd.leases[0m

[1mSEE ALSO[0m
       dhcpd(8), dhcp-options(5), dhcp-eval(5), dhcpd.conf(5), RFC2132,
       RFC2131.

[1mAUTHOR[0m
       [1mdhcpd(8) [22mwas written by Ted Lemon under a contract with Vixie Labs.
       Funding for this project was provided by Internet Systems Consortium.
       Information about Internet Systems Consortium can be found at:
       [1mhttps://www.isc.org/[0m



                                                               dhcpd.leases(5)
