DHCLIENT(8)             OpenBSD System Manager's Manual            DHCLIENT(8)

NAME
     dhclient - Dynamic Host Configuration Protocol (DHCP) Client

SYNOPSIS
     dhclient [-1du] [-p port] [interface ...]

DESCRIPTION
     The dhclient utility provides a means for configuring network interfaces
     using DHCP, BOOTP, or if these protocols fail, by statically assigning an
     address.

     The names of the network interfaces that dhclient should attempt to con-
     figure may be specified on the command line.  If no interface names are
     given, dhclient will identify all network interfaces, eliminating non-
     broadcast interfaces if possible, and attempt to configure each one.

     The options are as follows:

     -1      Forces dhclient to exit if it failed to configure an interface.

     -d      Forces dhclient to always run as a foreground process.  By de-
             fault, dhclient runs in the foreground until it has configured an
             interface, and then will revert to running in the background.

     -u      Forces dhclient to reject leases with unknown options in them.
             The default behaviour is to accept such lease offers

     -p port
             Specifies the UDP port dhclient should listen on, instead of the
             default (68).

     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 de-
     tails 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 gets a list of all the network interfaces that are con-
     figured in the current system.  It then attempts to configure each inter-
     face with DHCP.

     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 file.  On startup, after reading the
     dhclient.conf file, dhclient reads the leases file to refresh its memory
     about what leases it has been assigned.

     When a new lease is acquired, it is appended to the end of
     /var/db/dhclient.leases. In order to prevent the file from becoming arbi-
     trarily large, from time to time dhclient creates a new dhclient.leases
     file from its in-core lease database.  The old version of is retained un-
     der the name /var/db/dhcpd.leases~ until the next time dhclient rewrites
     the database.

     Old leases are kept around in case the DHCP server is unavailable when
     dhclient is first invoked (generally during the initial system boot pro-
     cess).  In that event, old leases from the dhclient.leases 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 becomes avail-
     able.
     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.

NOTES
     You must have the Berkeley Packet Filter (BPF) configured in your kernel.
     dhclient requires at least one /dev/bpf* file for each broadcast network
     interface that is attached to your system.  See bpf(4) for more informa-
     tion.

FILES
     /etc/dhclient.conf        DHCP client configuration file
     /var/db/dhclient.leases   database of acquired leases
     /var/db/dhclient.leases~  backup of dhclient.leases
     /var/run/dhclient.pid     process ID of dhclient

SEE ALSO
     dhclient.conf(5), dhclient.leases(5), dhclient-script(8), dhcp(8),
     dhcpd(8), dhcrelay(8)

AUTHOR
     dhclient has been written for the Internet Software Consortium by Ted
     Lemon <mellon@fugue.com> in cooperation with Vixie Enterprises.  To learn
     more about the Internet Software Consortium, see

           http://www.vix.com/isc.

     To learn more about Vixie Enterprises, see

           http://www.vix.com.

     This client was substantially modified and enhanced by Elliot Poger for
     use on Linux while he was working on the MosquitoNet project at Stanford.

     The current version owes much to Elliot's Linux enhancements, but was
     substantially reorganized and partially rewritten by Ted Lemon so as to
     use the same networking framework that the Internet Software Consortium
     DHCP server uses.  Much system-specific configuration code was moved into
     a shell script so that as support for more operating systems is added, it
     will not be necessary to port and maintain system-specific configuration
     code to these operating systems - instead, the shell script can invoke
     the native tools to accomplish the same purpose.

OpenBSD 2.9                     October 1, 1999                              2
