DragonFly On-Line Manual Pages
DHCLIENT(8) DragonFly System Manager's Manual DHCLIENT(8)
dhclient -- Dynamic Host Configuration Protocol (DHCP) client
dhclient [-dquwx] [-c file] [-l file] interface
The Dynamic Host Configuration Protocol (DHCP) allows hosts on a TCP/IP
network to configure one or more network interfaces based on information
collected from a DHCP server. DHCP is often used, for example, by cable
modem and DSL network providers to automate network configuration for
Information typically provided via DHCP includes address and subnet mask
for the interface, default route, and domain name server.
To have DragonFly configure an interface using DHCP (or its predecessor,
BOOTP) the dhclient utility is used. dhclient is run on the command line
with the name of the interface to be configured. If a dhclient is
already running for the interface, the old process will be killed and
replaced by the new invocation.
The options are as follows:
-c file Specify an alternate location to /etc/dhclient.conf for the con-
-d Forces dhclient to always run as a foreground process. By
default, dhclient runs in the foreground until it has configured
the interface, and then will revert to running in the back-
-l file Specify an alternate location to
/var/db/dhclient.leases.<IFNAME> for the leases file.
-q Forces dhclient to be less verbose on startup.
-u Forces dhclient to reject leases with unknown options in them.
The default behaviour is to accept such lease offers.
-w dhclient stays around permanently and will attempt to reconnect
even if the interface does not exist, is down, or goes down.
This is the default when interfaces are configured DHCP in
-x Kill any running dhclient on the specified interface.
The DHCP protocol allows a host to contact a central server which main-
tains a list of IP addresses which may be assigned on one or more sub-
nets. A DHCP client may request an address from this pool, and then use
it on a temporary basis for communication on the network. The DHCP pro-
tocol also provides a mechanism whereby a client can learn important
details about the network to which it is attached, such as the location
of a default router, the location of a name server, and so on.
On startup, dhclient reads /etc/dhclient.conf for configuration instruc-
tions. It then attempts to configure the network interface interface
In order to keep track of leases across system reboots and server
restarts, dhclient keeps a list of leases it has been assigned in the
/var/db/dhclient.leases.<IFNAME> file. IFNAME represents the network
interface of the DHCP client (e.g. em0), one for each interface. On
startup, after reading the dhclient.conf(5) file, dhclient reads the
leases file to refresh its memory about what leases it has been assigned.
Old leases are kept around in case the DHCP server is unavailable when
dhclient is first invoked (generally during the initial system boot
process). In that event, old leases from the dhclient.leases.<IFNAME>
file which have not yet expired are tested, and if they are determined to
be valid, they are used until either they expire or the DHCP server
A mobile host which may sometimes need to access a network on which no
DHCP server exists may be preloaded with a lease for a fixed address on
that network. When all attempts to contact a DHCP server have failed,
dhclient will try to validate the static lease, and if it succeeds, it
will use that lease until it is restarted.
A mobile host may also travel to some networks on which DHCP is not
available but BOOTP is. In that case, it may be advantageous to arrange
with the network administrator for an entry on the BOOTP database, so
that the host can boot quickly on that network rather than cycling
through the list of old leases.
dhclient requires at least one /dev/bpf* file for each broadcast network
interface. See bpf(4) for more information.
/etc/dhclient.conf DHCP client configuration file.
/var/db/dhclient.leases.<IFNAME> Database of acquired leases.
/var/run/dhclient.<IFNAME>.pid Pidfile for running instance. While
active, the pidfile is flock()'d by
dhclient which can be tested by a
program using flock() or by a script
using the lockf(1) utility, via a
non-blocking lock attempt.
bpf(4), dhclient.conf(5), dhclient.leases(5), dhclient-script(8),
dhcp(8), dhcpd(8) (net/isc-dhcp42-server), dhcrelay(8)
R. Droms, Interoperation Between DHCP and BOOTP, RFC 1534, October 1993.
R. Droms, Dynamic Host Configuration Protocol, RFC 2131, March 1997.
S. Alexander and R. Droms, DHCP Options and BOOTP Vendor Extensions, RFC
2132, March 1997.
T. Lemon and S. Cheshire, Encoding Long Options in the Dynamic Host
Configuration Protocol (DHCPv4), RFC 3396, November 2002.
T. Lemon, S. Cheshire, and B. Volz, The Classless Static Route Option for
Dynamic Host Configuration Protocol (DHCP) version 4, RFC 3442, December
dhclient was imported into DragonFly 2.1.
dhclient was written by Ted Lemon <email@example.com> and Elliot Poger
The current implementation was reworked by Henning Brauer
DragonFly 4.3 July 23, 2013 DragonFly 4.3