dhcpclient.1m (2010 09)

d
dhcpclient(1M) dhcpclient(1M)
configuration file, /etc/dhcpclient.data
.
While trying to read the
/etc/dhcpclient.data
file, the following conditions are possible:
1. It may be possible that the configuration file had been deleted or it may not be available for reading.
2. The file may have got corrupted and contains irrelevant data for the particular interface.
3. There may be no configuration information for the particular interface.
4. User may have specified
-n option meaning that a new lease is needed.
For all of the above cases,
dhcpclient has to first find the server which is ready for the service. For
this purpose, it will send a
DHCPDISCOVER message. If the user has specified server_ipaddress using
the
-s option, then replies only from the specified server will be accepted. The server in turn will reply
with the configuration parameters that it can offer. This message is called
DHCPOFFER. If the client has
sent the
DHCPDISCOVER to broadcast address, then it will receive
DHCPOFFER from more than one
server. The
dhcpclient selects one of the DHCPOFFER
obtained. Then, it will send DHCPREQUEST to
the server, requesting the configuration parameters. The server will reply with a positive acknowledge-
ment called
DHCPACK, if it is willing to send the configuration parameters to the host and with a negative
acknowledgement, if it is not willing to do so. If the
dhcpclient has received DHCPACK, it will copy all
the configuration parameters to the configuration file, else, it will send another
DHCPDISCOVER mes-
sage and repeat the whole process. This process is called "Obtaining a new lease".
If all the above 4 cases are not true, then the
dhcpclient can directly send the
DHCPREQUEST mes-
sage and obtain the configuration parameters as mentioned above. This process is called "Renewing the
lease".
The various options supported by
dhcpclient are as described below.
Options
-G When this option is used, the client will accept the reply from the DHCP
server only if the
class-id in the request and reply packet matches.
-N hostname
This option is used to send a hostname. The hostname should be specified as an ASCII
string.
-b interface This option is used during bootup time to obtain a new lease. If the client is trying to
obtain the configuration parameters from the server for the first time, then
/etc/dhcpclient.data
does not exist. So, using this option, the client obtains a new
lease for the interface specified.
-d interface This option is used for dumping the internal data of an interface. A sample dump is shown
below.
Interface PPA MAC Type Physical Address
lan0 0 ETHER 0x080009709631
-f tracefile This option is used to specify the file name for the debugging output.
-g class-id This option is used for specifying the class-id of the device group. class-id should be
specified as an ASCII string.
-l debug_level
This option is used for logging of debug information. debug_level specifies the amount of
debug information logged. The debugging messages are sent to STDERR.
-m interface This option is used for maintaining the lease. When invoked with this option, the
dhcpclient runs as a daemon. The dhcpclient calculates how much time it needs to
sleep before the lease needs to be renewed and then sleeps for that time. When it wakes up,
it extends the lease by sending the request to the DHCP server.
-n This option is used for ignoring the current lease. When this option is used, the current
configuration information is discarded and request for a new lease is sent.
-p This option is used for tracing the packets. It displays the packet contents in a readable for-
mat.
-r interface This option is used for releasing a lease. The dhcpclient releases all the assigned
configuration parameters. This is done by sending the DHCPRELEASE message to the
server. The dhcpclient then empties the record corresponding to that interface in the
2 Hewlett-Packard Company 2 HP-UX 11i Version 3: September 2010