805 lines
22 KiB
HTML
805 lines
22 KiB
HTML
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<HTML><HEAD><TITLE>Man page of dhclient</TITLE>
|
|
</HEAD><BODY>
|
|
<H1>dhclient</H1>
|
|
Section: Maintenance Commands (8)<BR><A HREF="#index">Index</A>
|
|
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
|
|
|
|
<A NAME="lbAB"> </A>
|
|
<H2>NAME</H2>
|
|
|
|
dhclient - Dynamic Host Configuration Protocol Client
|
|
<A NAME="lbAC"> </A>
|
|
<H2>SYNOPSIS</H2>
|
|
|
|
<B>dhclient</B>
|
|
|
|
[
|
|
<B>-4</B>
|
|
|
|
|
|
|
<B>-6</B>
|
|
|
|
]
|
|
[
|
|
<B>-S</B>
|
|
|
|
]
|
|
[
|
|
<B>-N</B>
|
|
|
|
[
|
|
<B>-N...</B>
|
|
|
|
]
|
|
]
|
|
[
|
|
<B>-T</B>
|
|
|
|
[
|
|
<B>-T...</B>
|
|
|
|
]
|
|
]
|
|
[
|
|
<B>-P</B>
|
|
|
|
[
|
|
<B>-P...</B>
|
|
|
|
]
|
|
]
|
|
<B>-R</B>
|
|
|
|
]
|
|
[
|
|
<B>-i</B>
|
|
|
|
]
|
|
[
|
|
<B>-I</B>
|
|
|
|
]
|
|
[
|
|
<B>-4o6</B>
|
|
|
|
<I>port</I>
|
|
|
|
]
|
|
[
|
|
<B>-D</B>
|
|
|
|
<I>LL|LLT</I>
|
|
|
|
]
|
|
[
|
|
<B>-p</B>
|
|
|
|
<I>port-number</I>
|
|
|
|
]
|
|
[
|
|
<B>-d</B>
|
|
|
|
]
|
|
[
|
|
<B>-df</B>
|
|
|
|
<I>duid-lease-file</I>
|
|
|
|
]
|
|
[
|
|
<B>-e</B>
|
|
|
|
<I>VAR=value</I>
|
|
|
|
]
|
|
[
|
|
<B>-q</B>
|
|
|
|
]
|
|
[
|
|
<B>-1</B>
|
|
|
|
]
|
|
[
|
|
<B>-r</B>
|
|
|
|
|
|
|
<B>-x</B>
|
|
|
|
]
|
|
[
|
|
<B>-lf</B>
|
|
|
|
<I>lease-file</I>
|
|
|
|
]
|
|
[
|
|
<B>-pf</B>
|
|
|
|
<I>pid-file</I>
|
|
|
|
]
|
|
[
|
|
<B>--no-pid</B>
|
|
|
|
]
|
|
[
|
|
<B>-cf</B>
|
|
|
|
<I>config-file</I>
|
|
|
|
]
|
|
[
|
|
<B>-sf</B>
|
|
|
|
<I>script-file</I>
|
|
|
|
]
|
|
[
|
|
<B>-s</B>
|
|
|
|
<I>server-addr</I>
|
|
|
|
]
|
|
[
|
|
<B>-g</B>
|
|
|
|
<I>relay</I>
|
|
|
|
]
|
|
[
|
|
<B>-n</B>
|
|
|
|
]
|
|
[
|
|
<B>-nw</B>
|
|
|
|
]
|
|
[
|
|
<B>-w</B>
|
|
|
|
]
|
|
[
|
|
<B>--dad-wait-time</B>
|
|
|
|
<I>seconds</I>
|
|
|
|
]
|
|
[
|
|
<B>--prefix-len-hint</B>
|
|
|
|
<I>length</I>
|
|
|
|
]
|
|
[
|
|
<B>--decline-wait-time</B>
|
|
|
|
<I>seconds</I>
|
|
|
|
]
|
|
[
|
|
<B>-v</B>
|
|
|
|
]
|
|
[
|
|
<B>--version</B>
|
|
|
|
]
|
|
[
|
|
<I>if0</I>
|
|
|
|
[
|
|
<I>...ifN</I>
|
|
|
|
]
|
|
]
|
|
<A NAME="lbAD"> </A>
|
|
<H2>DESCRIPTION</H2>
|
|
|
|
The Internet Systems Consortium DHCP Client, <B>dhclient</B>, provides a
|
|
means for configuring one or more network interfaces using the Dynamic
|
|
Host Configuration Protocol, BOOTP protocol, or if these protocols
|
|
fail, by statically assigning an address.
|
|
<A NAME="lbAE"> </A>
|
|
<H2>OPERATION</H2>
|
|
|
|
<P>
|
|
|
|
The DHCP protocol allows a host to contact a central server which
|
|
maintains a list of IP addresses which may be assigned on one or more
|
|
subnets. A DHCP client may request an address from this pool, and
|
|
then use it on a temporary basis for communication on network. The
|
|
DHCP protocol 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.
|
|
<P>
|
|
|
|
There are two versions of the DHCP protocol DHCPv4 and DHCPv6. At
|
|
startup the client may be started for one or the other via the
|
|
<B>-4</B>
|
|
|
|
or
|
|
<B>-6</B>
|
|
|
|
options.
|
|
<P>
|
|
|
|
On startup, <B>dhclient</B> reads the dhclient.conf
|
|
for configuration instructions. It then gets a list of all the
|
|
network interfaces that are configured in the current system. For
|
|
each interface, it attempts to configure the interface using the DHCP
|
|
protocol.
|
|
<P>
|
|
|
|
In order to keep track of leases across system reboots and server
|
|
restarts, <B>dhclient</B> keeps a list of leases it has been assigned in the
|
|
dhclient.leases file. On startup, after reading the dhclient.conf
|
|
file, <B>dhclient</B> reads the dhclient.leases file to refresh its memory
|
|
about what leases it has been assigned.
|
|
<P>
|
|
|
|
When a new lease is acquired, it is appended to the end of the
|
|
dhclient.leases file. In order to prevent the file from becoming
|
|
arbitrarily large, from time to time <B>dhclient</B> creates a new
|
|
dhclient.leases file from its in-core lease database. The old version
|
|
of the dhclient.leases file is retained under the name
|
|
<I>dhclient.leases~</I>
|
|
|
|
until the next time <B>dhclient</B> rewrites the database.
|
|
<P>
|
|
|
|
Old leases are kept around in case the DHCP server is unavailable when
|
|
<B>dhclient</B> is first invoked (generally during the initial system boot
|
|
process). 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 available.
|
|
<P>
|
|
|
|
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, <B>dhclient</B> will try to validate the static lease, and if it
|
|
succeeds, will use that lease until it is restarted.
|
|
<P>
|
|
|
|
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.
|
|
<A NAME="lbAF"> </A>
|
|
<H2>COMMAND LINE</H2>
|
|
|
|
<P>
|
|
|
|
The names of the network interfaces that <B>dhclient</B> should attempt to
|
|
configure may be specified on the command line. If no interface names
|
|
are specified on the command line <B>dhclient</B> will normally identify all
|
|
network interfaces, eliminating non-broadcast interfaces if
|
|
possible, and attempt to configure each interface.
|
|
<P>
|
|
|
|
It is also possible to specify interfaces by name in the dhclient.conf
|
|
file. If interfaces are specified in this way, then the client will
|
|
only configure interfaces that are either specified in the
|
|
configuration file or on the command line, and will ignore all other
|
|
interfaces.
|
|
<P>
|
|
|
|
The client normally prints no output during its startup sequence. It
|
|
can be made to emit verbose messages displaying the startup sequence events
|
|
until it has acquired an address by supplying the
|
|
<B>-v</B>
|
|
|
|
command line argument. In either case, the client logs messages using
|
|
the
|
|
<B><A HREF="/cgi-bin/man/man2html?3+syslog">syslog</A>(3)</B>
|
|
|
|
facility.
|
|
<A NAME="lbAG"> </A>
|
|
<H2>OPTIONS</H2>
|
|
|
|
<DL COMPACT>
|
|
<DT id="1"><B>-4</B>
|
|
|
|
<DD>
|
|
Use the DHCPv4 protocol to obtain an IPv4 address and configuration
|
|
parameters. This is the default and cannot be combined with
|
|
<B>-6</B>.
|
|
<DT id="2"><B>-6</B>
|
|
|
|
<DD>
|
|
Use the DHCPv6 protocol to obtain whatever IPv6 addresses are available
|
|
along with configuration parameters. It cannot be combined with
|
|
<B>-4</B>. The <B>-S -T -P -N</B> and
|
|
<B>-D</B> arguments provide more control over aspects of the DHCPv6
|
|
processing. Note: it is not recommended to mix queries of different
|
|
types together or even to share the lease file between them.
|
|
<DT id="3"><B>-4o6</B><I> port</I>
|
|
|
|
<DD>
|
|
Participate in the DHCPv4 over DHCPv6 protocol specified by RFC 7341.
|
|
This associates a DHCPv4 and a DHCPv6 client to allow the v4 client to
|
|
send v4 requests encapsulated in a v6 packet. Communication
|
|
between the two clients is done on a pair of UDP sockets bound
|
|
to ::1 <I>port</I> and <I>port + 1</I>. Both clients must
|
|
be launched using the same <I>port</I> argument.
|
|
<DT id="4"><B>-1</B>
|
|
|
|
<DD>
|
|
Try to get a lease once. On failure exit with code 2. In DHCPv6 this
|
|
sets the maximum duration of the initial exchange to
|
|
<I>timeout</I>
|
|
|
|
(from dhclient.conf with a default of sixty seconds).
|
|
<DT id="5"><B>-d</B>
|
|
|
|
<DD>
|
|
|
|
Force
|
|
<B>dhclient</B>
|
|
|
|
to run as a foreground process. Normally the DHCP client will run
|
|
in the foreground until is has configured an interface at which time
|
|
it will revert to running in the background. This option is useful
|
|
when running the client under a debugger, or when running it out of
|
|
inittab on System V systems. This implies <B>-v</B>.
|
|
<DT id="6"><B>-nw</B>
|
|
|
|
<DD>
|
|
Become a daemon immediately (nowait) rather than waiting until an
|
|
IP address has been acquired.
|
|
<DT id="7"><B>-q</B>
|
|
|
|
<DD>
|
|
Be quiet at startup, this is the default.
|
|
<DT id="8"><B>-v</B>
|
|
|
|
<DD>
|
|
Enable verbose log messages.
|
|
|
|
<DT id="9"><B>-w</B>
|
|
|
|
<DD>
|
|
Continue running even if no broadcast interfaces were found. Normally
|
|
DHCP client will exit if it isn't able to identify any network interfaces
|
|
to configure. On laptop computers and other computers with
|
|
hot-swappable I/O buses, it is possible that a broadcast interface may
|
|
be added after system startup. This flag can be used to cause the client
|
|
not to exit when it doesn't find any such interfaces. The
|
|
<B><A HREF="/cgi-bin/man/man2html?1+omshell">omshell</A>(1)</B>
|
|
|
|
program can then be used to notify the client when a network interface
|
|
has been added or removed, so that the client can attempt to configure an IP
|
|
address on that interface.
|
|
<DT id="10"><B>-n</B>
|
|
|
|
<DD>
|
|
Do not configure any interfaces. This is most likely to be useful in
|
|
combination with the
|
|
<B>-w</B>
|
|
|
|
flag.
|
|
<DT id="11"><B>-e</B><I> VAR=value</I>
|
|
|
|
<DD>
|
|
Define additional environment variables for the environment where
|
|
<B>dhclient-script</B>
|
|
|
|
executes. You may specify multiple
|
|
<B>-e</B>
|
|
|
|
options on the command line.
|
|
<DT id="12"><B>-r</B>
|
|
|
|
<DD>
|
|
Release the current lease and stop the running DHCP client as previously
|
|
recorded in the PID file. When shutdown via this method
|
|
<B>dhclient-script</B>
|
|
|
|
will be executed with the specific reason for calling the script set.
|
|
The client normally doesn't release the current lease as this is not
|
|
required by the DHCP protocol but some cable ISPs require their clients
|
|
to notify the server if they wish to release an assigned IP address.
|
|
|
|
|
|
<DT id="13"><B>-x</B>
|
|
|
|
<DD>
|
|
Stop the running DHCP client without releasing the current lease.
|
|
Kills existing <B>dhclient</B> process as previously recorded in the
|
|
PID file. When shutdown via this method
|
|
<B>dhclient-script</B>
|
|
|
|
will be executed with the specific reason for calling the script set.
|
|
<DT id="14"><B>-p</B><I> port-number</I>
|
|
|
|
<DD>
|
|
The UDP port number on which the DHCP client should listen and transmit.
|
|
If unspecified,
|
|
<B>dhclient</B>
|
|
|
|
uses the default port of 68. This is mostly useful for debugging purposes.
|
|
If a different port is specified on which the client should listen and
|
|
transmit, the client will also use a different destination port -
|
|
one less than the specified port.
|
|
<DT id="15"><B>-s</B><I> server-addr</I>
|
|
|
|
<DD>
|
|
Specify the server IP address or fully qualified domain name to use as
|
|
a destination for DHCP protocol messages before
|
|
<B>dhclient</B>
|
|
|
|
has acquired an IP address. Normally,
|
|
<B>dhclient</B>
|
|
|
|
transmits these messages to 255.255.255.255 (the IP limited broadcast
|
|
address). Overriding this is mostly useful for debugging purposes. This
|
|
feature is not supported in DHCPv6 (<B>-6</B>) mode.
|
|
<DT id="16"><B>-g</B><I> relay</I>
|
|
|
|
<DD>
|
|
|
|
Set the giaddr field of all packets to the <I>relay</I> IP address
|
|
simulating a relay agent. This is for testing purposes only and
|
|
should not be expected to work in any consistent or useful way.
|
|
<DT id="17"><B>-i</B>
|
|
|
|
<DD>
|
|
Use a DUID with DHCPv4 clients. If no DUID is available in the
|
|
lease file one will be constructed and saved. The DUID will be
|
|
used to construct a RFC4361 style client id that will be included
|
|
in the client's messages. This client id can be overridden by
|
|
setting a client id in the configuration file. Overriding the
|
|
client id in this fashion is discouraged.
|
|
<DT id="18"><B>-I</B>
|
|
|
|
<DD>
|
|
Use the standard DDNS scheme from RFCs 4701 & 4702.
|
|
<DT id="19"><DT><B>--decline-wait-time</B><I> seconds</I>
|
|
|
|
<DD>
|
|
<DD>
|
|
Specify the time (in seconds) that an IPv4 client should wait after
|
|
declining an address before issuing a discover. The default is
|
|
10 seconds as recommended by RFC 2131, Section 3.1.5. A value of
|
|
zero equates to no wait at all.
|
|
</DL>
|
|
<P>
|
|
|
|
<B>--version</B>
|
|
|
|
Print version number and exit.
|
|
<P>
|
|
|
|
<I>Options available for DHCPv6 mode:</I>
|
|
|
|
<DL COMPACT>
|
|
<DT id="20"><B>-S</B>
|
|
|
|
<DD>
|
|
|
|
Use Information-request to get only stateless configuration parameters
|
|
(i.e., without address). This implies <B>-6</B>. It also doesn't
|
|
rewrite the lease database.
|
|
|
|
<DT id="21"><B>-T</B>
|
|
|
|
<DD>
|
|
|
|
Ask for IPv6 temporary addresses, one set per <B>-T</B> flag. This
|
|
implies <B>-6</B> and also disables the normal address query.
|
|
See <B>-N</B> to restore it.
|
|
<DT id="22"><B>-P</B>
|
|
|
|
<DD>
|
|
Enable IPv6 prefix delegation. This implies <B>-6</B> and also
|
|
disables the normal address query. See <B>-N</B> to restore it.
|
|
Multiple prefixes can be requested with multiple <B>-P</B> flags.
|
|
Note only one requested interface is allowed.
|
|
<DT id="23"><B>-R</B>
|
|
|
|
<DD>
|
|
Require that responses include all of the items requested by any
|
|
<B>-N</B>, <B>-T</B>, or <B>-P</B> options. Normally even if
|
|
the command line includes a number of these the client will be willing
|
|
to accept the best lease it can even if the lease doesn't include all
|
|
of the requested items. This option causes the client to only
|
|
accept leases that include all of the requested items.
|
|
<P>
|
|
Note well: enabling this may prevent the client from using any
|
|
leases it receives if the servers aren't configured to supply
|
|
all of the items.
|
|
<DT id="24"><B>-D</B><I> LL or LLT</I>
|
|
|
|
<DD>
|
|
Override the default when selecting the type of DUID to use. By default,
|
|
DHCPv6 <B>dhclient</B> creates an identifier based on the link-layer address
|
|
(DUID-LL) if it is running in stateless mode (with <B>-S</B>, not
|
|
requesting an address), or it creates an identifier based on the
|
|
link-layer address plus a timestamp (DUID-LLT) if it is running in
|
|
stateful mode (without <B>-S</B>, requesting an address). When DHCPv4
|
|
is configured to use a DUID using <B>-i</B> option the default is to use
|
|
a DUID-LLT. <B>-D</B>
|
|
overrides these default, with a value of either <I>LL</I> or <I>LLT</I>.
|
|
<DT id="25"><B>-N</B>
|
|
|
|
<DD>
|
|
|
|
Restore normal address query for IPv6. This implies <B>-6</B>.
|
|
It is used to restore normal operation after using <B>-T</B> or <B>-P</B>.
|
|
Multiple addresses can be requested with multiple <B>-N</B> flags.
|
|
<DT id="26"><B>--address-prefix-len</B><I> length</I>
|
|
|
|
<DD>
|
|
Specify the length of the prefix for IPv6 addresses. This value is passed by
|
|
dhclient into the client script via the environment variable, ip6_prefixlen,
|
|
when binding IPv6 addresses. The default value is 128. Alternatively you may
|
|
change the default at compile time by setting DHCLIENT_DEFAULT_PREFIX_LEN in
|
|
includes/site.h.
|
|
</DL>
|
|
<P>
|
|
|
|
<DL COMPACT>
|
|
<DT id="27"><B>--dad-wait-time</B><I> seconds</I>
|
|
|
|
<DD>
|
|
Specify maximum time (in seconds) that the client should wait for the
|
|
duplicate address detection (DAD) to complete on an interface. This
|
|
value is propagated to the dhclient script in a dad_wait_time environment
|
|
variable. If any of the IPv6 addresses on the interface are tentative
|
|
(DAD is in progress), the script will wait for the specified number of
|
|
seconds for DAD to complete. If the script ignores this variable the
|
|
parameter has no effect.
|
|
</DL>
|
|
<P>
|
|
|
|
<DL COMPACT>
|
|
<DT id="28"><B>--prefix-len-hint</B><I> length</I>
|
|
|
|
<DD>
|
|
When used in conjunction with -P, it directs the client to use the given
|
|
length to use a prefix hint of, "::/length", when requesting new prefixes.
|
|
</DL>
|
|
<P>
|
|
|
|
<I>Modifying default file locations:</I>
|
|
|
|
The following options can be used to modify the locations a client uses
|
|
for its files. They can be particularly useful if, for example,
|
|
<B>/var/lib/dhcp</B>
|
|
|
|
or
|
|
<B>/var/run</B>
|
|
|
|
have not been mounted when the DHCP client is started.
|
|
<DL COMPACT>
|
|
<DT id="29"><B>-cf</B><I> config-file</I>
|
|
|
|
<DD>
|
|
Path to the client configuration file. If unspecified, the default
|
|
<B>/etc/dhcp/dhclient.conf</B>
|
|
|
|
is used. See <B><A HREF="/cgi-bin/man/man2html?5+dhclient.conf">dhclient.conf</A>(5)</B> for a description of this file.
|
|
<DT id="30"><B>-df</B><I> duid-lease-file</I>
|
|
|
|
<DD>
|
|
Path to a secondary lease file. If the primary lease file doesn't contain
|
|
a DUID this file will be searched. The DUID read from the secondary will
|
|
be written to the primary. This option can be used to allow an IPv4 instance
|
|
of the client to share a DUID with an IPv6 instance. After starting one of
|
|
the instances the second can be started with this option pointing to the
|
|
lease file of the first instance. There is no default. If no file is
|
|
specified no search is made for a DUID should one not be found in the main
|
|
lease file.
|
|
<DT id="31"><B>-lf</B><I> lease-file</I>
|
|
|
|
<DD>
|
|
Path to the lease database file. If unspecified, the default
|
|
<B>/var/lib/dhcp/dhclient.leases</B>
|
|
|
|
is used. See <B><A HREF="/cgi-bin/man/man2html?5+dhclient.leases">dhclient.leases</A>(5)</B> for a description of this file.
|
|
<DT id="32"><B>-pf</B><I> pid-file</I>
|
|
|
|
<DD>
|
|
Path to the process ID file. If unspecified, the default
|
|
<B>/var/run/dhclient.pid</B>
|
|
|
|
is used.
|
|
<DT id="33"><B>--no-pid</B>
|
|
|
|
<DD>
|
|
Option to disable writing pid files. By default the program
|
|
will write a pid file. If the program is invoked with this
|
|
option it will not attempt to kill any existing client processes
|
|
even if invoked with <B>-r</B> or <B>-x</B>.
|
|
<DT id="34"><B>-sf</B><I> script-file</I>
|
|
|
|
<DD>
|
|
Path to the network configuration script invoked by
|
|
<B>dhclient</B>
|
|
|
|
when it gets a lease. If unspecified, the default
|
|
<B>/sbin/dhclient-script</B>
|
|
|
|
is used. See <B><A HREF="/cgi-bin/man/man2html?8+dhclient-script">dhclient-script</A>(8)</B> for a description of this file.
|
|
</DL>
|
|
<P>
|
|
|
|
<A NAME="lbAH"> </A>
|
|
<H2>PORTS</H2>
|
|
|
|
During operations the client may use multiple UDP ports
|
|
to provide different functions. Which ports are opened depends
|
|
on both the way you compiled your code and the configuration you
|
|
supply. The following should provide you an idea of what
|
|
ports may be in use.
|
|
<P>
|
|
Normally a DHCPv4 client will open a raw UDP socket to receive
|
|
and send most DHCPv4 packets. It also opens a fallback UDP socket
|
|
for use in sending unicast packets. Normally these will both
|
|
use the well known port number for BOOTPC.
|
|
<P>
|
|
For DHCPv6 the client opens a UDP socket on the well known
|
|
client port and a fallback UDP socket on a random port for
|
|
use in sending unicast messages. Unlike DHCPv4 the well
|
|
known socket doesn't need to be opened in raw mode.
|
|
<P>
|
|
If you have included an omapi port statement in your configuration
|
|
file then the client will open a TCP socket on that port to
|
|
listen for OMPAI connections. When something connects another
|
|
port will be used for the established connection.
|
|
<P>
|
|
When DDNS is enabled at compile time (see includes/site.h)
|
|
the client will open both a v4 and a v6 UDP socket on
|
|
random ports. These ports are not opened unless/until the
|
|
client first attempts to do an update. If the client is not
|
|
configured to do updates, the ports will never be opened.
|
|
<P>
|
|
|
|
<A NAME="lbAI"> </A>
|
|
<H2>CONFIGURATION</H2>
|
|
|
|
The syntax of the <B><A HREF="/cgi-bin/man/man2html?5+dhclient.conf">dhclient.conf</A>(5)</B> file is discussed separately.
|
|
<A NAME="lbAJ"> </A>
|
|
<H2>OMAPI</H2>
|
|
|
|
The DHCP client provides some ability to control it while it is
|
|
running, without stopping it. This capability is provided using OMAPI,
|
|
an API for manipulating remote objects. OMAPI clients connect to the
|
|
client using TCP/IP, authenticate, and can then examine the client's
|
|
current status and make changes to it.
|
|
<P>
|
|
|
|
Rather than implementing the underlying OMAPI protocol directly, user
|
|
programs should use the dhcpctl API or OMAPI itself. Dhcpctl is a
|
|
wrapper that handles some of the housekeeping chores that OMAPI does
|
|
not do automatically. Dhcpctl and OMAPI are documented in
|
|
<B><A HREF="/cgi-bin/man/man2html?3+dhcpctl">dhcpctl</A>(3)</B>
|
|
and <B><A HREF="/cgi-bin/man/man2html?3+omapi">omapi</A>(3)</B>. Most things you'd want to do with the client can
|
|
be done directly using the <B><A HREF="/cgi-bin/man/man2html?1+omshell">omshell</A>(1)</B> command, rather than
|
|
having to write a special program.
|
|
<A NAME="lbAK"> </A>
|
|
<H2>THE CONTROL OBJECT</H2>
|
|
|
|
The control object allows you to shut the client down, releasing all
|
|
leases that it holds and deleting any DNS records it may have added.
|
|
It also allows you to pause the client - this unconfigures any
|
|
interfaces the client is using. You can then restart it, which
|
|
causes it to reconfigure those interfaces. You would normally pause
|
|
the client prior to going into hibernation or sleep on a laptop
|
|
computer. You would then resume it after the power comes back.
|
|
This allows PC cards to be shut down while the computer is hibernating
|
|
or sleeping, and then reinitialized to their previous state once the
|
|
computer comes out of hibernation or sleep.
|
|
<P>
|
|
|
|
The control object has one attribute - the state attribute. To shut
|
|
the client down, set its state attribute to 2. It will automatically
|
|
do a DHCPRELEASE. To pause it, set its state attribute to 3. To
|
|
resume it, set its state attribute to 4.
|
|
<P>
|
|
|
|
<A NAME="lbAL"> </A>
|
|
<H2>ENVIRONMENT VARIABLES</H2>
|
|
|
|
<P>
|
|
|
|
The following environment variables may be defined
|
|
to override the builtin defaults for file locations.
|
|
Note that use of the related command-line options
|
|
will ignore the corresponding environment variable settings.
|
|
<DL COMPACT>
|
|
<DT id="35"><B>PATH_DHCLIENT_CONF</B>
|
|
|
|
<DD>
|
|
The dhclient.conf configuration file.
|
|
<DT id="36"><B>PATH_DHCLIENT_DB</B>
|
|
|
|
<DD>
|
|
The dhclient.leases database.
|
|
<DT id="37"><B>PATH_DHCLIENT_PID</B>
|
|
|
|
<DD>
|
|
The dhclient PID file.
|
|
<DT id="38"><B>PATH_DHCLIENT_SCRIPT</B>
|
|
|
|
<DD>
|
|
The dhclient-script file.
|
|
</DL>
|
|
<P>
|
|
|
|
<A NAME="lbAM"> </A>
|
|
<H2>FILES</H2>
|
|
|
|
<B>/sbin/dhclient-script,</B>
|
|
|
|
<B>/etc/dhcp/dhclient.conf, /var/lib/dhcp/dhclient.leases, /var/run/dhclient.pid,</B>
|
|
|
|
<B>/var/lib/dhcp/dhclient.leases~.</B>
|
|
|
|
<A NAME="lbAN"> </A>
|
|
<H2>SEE ALSO</H2>
|
|
|
|
<A HREF="/cgi-bin/man/man2html?8+dhcpd">dhcpd</A>(8), <A HREF="/cgi-bin/man/man2html?8+dhcrelay">dhcrelay</A>(8), <A HREF="/cgi-bin/man/man2html?8+dhclient-script">dhclient-script</A>(8), <A HREF="/cgi-bin/man/man2html?5+dhclient.conf">dhclient.conf</A>(5),
|
|
<A HREF="/cgi-bin/man/man2html?5+dhclient.leases">dhclient.leases</A>(5), <A HREF="/cgi-bin/man/man2html?5+dhcp-eval">dhcp-eval</A>(5).
|
|
<A NAME="lbAO"> </A>
|
|
<H2>AUTHOR</H2>
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?8+dhclient">dhclient</A>(8)</B>
|
|
|
|
To learn more about Internet Systems Consortium,
|
|
see
|
|
<B><A HREF="https://www.isc.org">https://www.isc.org</A></B>
|
|
|
|
<P>
|
|
|
|
This client was substantially modified and enhanced by Elliot Poger
|
|
for use on Linux while he was working on the MosquitoNet project at
|
|
Stanford.
|
|
<P>
|
|
|
|
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 Systems
|
|
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.
|
|
<P>
|
|
|
|
<P>
|
|
|
|
<HR>
|
|
<A NAME="index"> </A><H2>Index</H2>
|
|
<DL>
|
|
<DT id="39"><A HREF="#lbAB">NAME</A><DD>
|
|
<DT id="40"><A HREF="#lbAC">SYNOPSIS</A><DD>
|
|
<DT id="41"><A HREF="#lbAD">DESCRIPTION</A><DD>
|
|
<DT id="42"><A HREF="#lbAE">OPERATION</A><DD>
|
|
<DT id="43"><A HREF="#lbAF">COMMAND LINE</A><DD>
|
|
<DT id="44"><A HREF="#lbAG">OPTIONS</A><DD>
|
|
<DT id="45"><A HREF="#lbAH">PORTS</A><DD>
|
|
<DT id="46"><A HREF="#lbAI">CONFIGURATION</A><DD>
|
|
<DT id="47"><A HREF="#lbAJ">OMAPI</A><DD>
|
|
<DT id="48"><A HREF="#lbAK">THE CONTROL OBJECT</A><DD>
|
|
<DT id="49"><A HREF="#lbAL">ENVIRONMENT VARIABLES</A><DD>
|
|
<DT id="50"><A HREF="#lbAM">FILES</A><DD>
|
|
<DT id="51"><A HREF="#lbAN">SEE ALSO</A><DD>
|
|
<DT id="52"><A HREF="#lbAO">AUTHOR</A><DD>
|
|
</DL>
|
|
<HR>
|
|
This document was created by
|
|
<A HREF="/cgi-bin/man/man2html">man2html</A>,
|
|
using the manual pages.<BR>
|
|
Time: 00:06:11 GMT, March 31, 2021
|
|
</BODY>
|
|
</HTML>
|