1dhcpd(8) System Manager's Manual dhcpd(8)
2
3
4
6 dhcpd - Dynamic Host Configuration Protocol Server
7
9 dhcpd [ -p port ] [ -f ] [ -d ] [ -q ] [ -t | -T ] [ -4 | -6 ] [ -4o6
10 port ] [ -s server ] [ -cf config-file ] [ -lf lease-file ] [ -pf pid-
11 file ] [ --no-pid ] [ -user user ] [ -group group ] [ -chroot dir ] [
12 -tf trace-output-file ] [ -play trace-playback-file ] [ if0 [ ...ifN ]
13 ]
14
15 dhcpd --version
16
18 The Internet Systems Consortium DHCP Server, dhcpd, implements the
19 Dynamic Host Configuration Protocol (DHCP) and the Internet Bootstrap
20 Protocol (BOOTP). DHCP allows hosts on a TCP/IP network to request and
21 be assigned IP addresses, and also to discover information about the
22 network to which they are attached. BOOTP provides similar functional‐
23 ity, with certain restrictions.
24
26 The DHCP protocol allows a host which is unknown to the network admin‐
27 istrator to be automatically assigned a new IP address out of a pool of
28 IP addresses for its network. In order for this to work, the network
29 administrator allocates address pools in each subnet and enters them
30 into the dhcpd.conf(5) file.
31
32 There are two versions of the DHCP protocol DHCPv4 and DHCPv6. At
33 startup the server may be started for one or the other via the -4 or
34 -6 arguments.
35
36 On startup, dhcpd reads the dhcpd.conf file and stores a list of avail‐
37 able addresses on each subnet in memory. When a client requests an
38 address using the DHCP protocol, dhcpd allocates an address for it.
39 Each client is assigned a lease, which expires after an amount of time
40 chosen by the administrator (by default, one day). Before leases
41 expire, the clients to which leases are assigned are expected to renew
42 them in order to continue to use the addresses. Once a lease has
43 expired, the client to which that lease was assigned is no longer per‐
44 mitted to use the leased IP address.
45
46 In order to keep track of leases across system reboots and server
47 restarts, dhcpd keeps a list of leases it has assigned in the
48 dhcpd.leases(5) file. Before dhcpd grants a lease to a host, it
49 records the lease in this file and makes sure that the contents of the
50 file are flushed to disk. This ensures that even in the event of a
51 system crash, dhcpd will not forget about a lease that it has assigned.
52 On startup, after reading the dhcpd.conf file, dhcpd reads the
53 dhcpd.leases file to refresh its memory about what leases have been
54 assigned.
55
56 New leases are appended to the end of the dhcpd.leases file. In order
57 to prevent the file from becoming arbitrarily large, from time to time
58 dhcpd creates a new dhcpd.leases file from its in-core lease database.
59 Once this file has been written to disk,