dhcpconf - Controller for DHCP client configuration
/usr/sbin/dhcpconf [-d] [-f] [-s] [-a server_ip] [-w seconds]
interface start | drop | release
/usr/sbin/dhcpconf [interface] dns | domain | gateways |
hostname | nis | routes
Directs all DHCP protocol messages to the given IP
address. Currently not implemented. Starts DHCP only if
the interface is down. Starts the DHCP client daemon,
joinc, if not already running. This option is implied by
the start command. Instructs dhcpconf to wait for the
time specified (if positive) or forever (if negative), or
until the operation completes or fails. This option is
only relevant on operations which cannot complete immediately.
If the timer expires while the operation is in
progress, dhcpconf exits with a failure code, but the
operation continues. If the user specifies a finite wait
interval it should, for consistency, be at least equal to
the sum of the timeout values for exponential backoff in
the startup file, /etc/join/client.pcy. This option is
only relevant on the start command. When an interface is
started, joinc sends DHCP discover packets using the exponential
backoff and retransmission intervals given in the
/etc/join/client.pcy file. If no reply is received at the
end of this cycle, the client replies to the controller
with failure. When this option is in effect, joinc continues
trying to contact a DHCP server forever, either by
retrying the whole backoff cycle or using the last timeout
value in the array. See client.pcy(4) for details. Puts
the interface specified under control of DHCP. The joinc
server commences the DHCP on the interface. Fine tuning of
this process is provided by parameters in the startup file
/etc/join/client.pcy. Makes joinc take the interface down
and transmit a DHCP release message to the DHCP server
that the IP address assigned to the interface is no longer
needed. The server is permitted to reassign the IP address
to another client. Tells the client daemon that it should
relinquish control of the interface. The options to drop
and release the interface are subtly different. Release is
part of the DHCP protocol; drop is not. Drop tells DHCP
that its services for the interface in question are no
longer required -- DHCP will not try to renew the lease on
the IP address and if the lease should expire no action
will be taken. This violates the protocol and is not recommended,
except for testing.
The dhcpconf command and its companion joinc implement the
client side of the Dynamic Host Configuration Protocol,
DHCP. The responsibilities of dhcpconf are as follows:
Control invocation and termination of DHCP on the client's
hardware interface(s). Provide a mechanism for rendezvous
with the transactions of DHCP which are proceeding asynchronously
with respect to the client boot.
All invocations of dhcpconf send instructions or requests
to joinc, which is listening at a well known port number
on the Internet Protocol loopback address. Unless the -w
option is given, dhcpconf expects an immediate reply, and
exits immediately with a success or failure code, depending
upon the reply received. When the request is one which
the client is unable to fulfill immediately, the reply
acknowledges that the request has been validated and that
the client will initiate the task required. With the
exception of start, which implicitly starts the client
daemon, dhcpconf exits with a failure code if joinc is not
already running. When the -w option is given, dhcpconf
waits for the requested operation either to complete,
fail, or wait for the number of seconds specified in the
following argument. When the timer expires, dhcpconf exits
with a failure code, but the operation requested continues.
The dhcpconf commands are divided into two groups: start,
release, and drop initiate and terminate DHCP control of
an interface. The remainder request dhcpconf to configure
the host-wide parameters or service specified, according
to DHCP supplied data. The latter do not, in general, need
an interface to be specified, except in the circumstance
that different interfaces receive different configurations
(See NOTES).
When two or more interfaces are configured by DHCP, the
possibility exists that the configurations received may
differ. This is the norm for interface specific parameters,
but for parameters that pertain to the host as a
whole, questions of interpretation arise. List items, in
particular, may differ for example, the default gateways.
When configuring services, dhcpconf will not merge data
from different interfaces. Rather only a single interface
is consulted, which, unless given on the command line, is
the first one in dhcpconf program's internal array, which
is configured when the request is made.
A cluster member should never be a DHCP client. It should
always use static addressing.
If a cluster is to support a DHCP server, there can only
be one DHCP server for all the cluster members using a
common database with failover.
DHCP client is not supported on dataless clients.
Exit codes are as follows: Success. DHCP was not successful.
The DHCP client daemon may not be running, the interface
might have failed to configure, or no satisfactory
DHCP responses were received. Bad arguments. A timer was
set (with -w) and the interface had not configured before
it expired. Can only be run as root. Some system error
(should never occur)
Commands: dhcpparm(8), joinc(8), showdhc(8), shleases(8)
Files: client.pcy(4)
Information: DHCP(7)
dhcpconf(8)
[ Back ] |