dhcpconf(8) — Maintenance
NAME
dhcpconf − controller for DHCP client configuration
SYNOPSIS
/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
FLAGS
−a server_ip
Directs all DHCP protocol messages to the given IP address. Currently not implemented.
−dStarts DHCP only if the interface is down.
−sStarts the DHCP client daemon, joinc, if not already running. This flag is implied by the start command.
−w seconds
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 still in progress, dhcpconf will exit with a failure code, but the operation will still continue. 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.
−fThis 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 /etc/join/client.pcy. If no reply has been received at the end of this cycle, the client will reply to the controller with failure. When this option is in effect, joinc will continue 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.
startPuts 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.
releaseMakes 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 will be permitted to reassign the IP address to another client.
dropTells 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.
DESCRIPTION
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 flags is given, dhcpconf expects an immediate reply, and will exit 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 merely indicates an acknowledgment 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 will exit with a failure code if joinc is not already running. When the −w flag is given, dhcpconf will wait for the requested operation either to complete, fail, or for the number of seconds specified in the following argument. When the timer expires, dhcpconf exits with a failure code, but the operation requested will continue.
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).
NOTES
When two or more interfaces are configured by DHCP, the possibility exists that the configurations received may differ. This will be 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 e.g. 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, will be the first one in dhcpconf program’s internal array, which is configured at the time the request is made.
DIAGNOSTICS
Exit codes are as follows:
0Success.
2DHCP 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.
3Bad arguments.
4A timer was set (with −w) and the interface had not configured before it expired.
5Can only be run as root.
6Some system error (should never occur)
RESTRICTIONS
DHCP client is not supported on dataless clients.
RELATED INFORMATION
Commands: dhcpparm(8), joinc(8), showdhc(8), shleases(8).
Files: client.pcy(4)
Information: DHCP(7)