-4 Use the DHCPv4 protocol to obtain an IPv4 address and configuration parameters. This is the
default and cannot be combined with -6.
|
-6 Use the DHCPv6 protocol to obtain whatever IPv6 addresses are available along with configuration
parameters. It cannot be combined with -4. The -S -T -P and -N 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.
|
-1 Try to get a lease once. On failure exit with code 2. In DHCPv6 this sets the maximum duration
of the initial exchange to timeout (from dhclient.conf(5) with a default of sixty seconds).
|
-d Force dhclient 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 -v.
|
-nw Become a daemon immediately (nowait) rather than waiting until an an IP address has been acquired.
|
-q Be quiet at startup, this is the default.
|
-v Enable verbose log messages.
|
-w 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 omshell(1) 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.
|
-n Do not configure any interfaces. This is most likely to be useful in combination with the -w
flag.
|
-e VAR=val
Define additional environment variables for the environment where dhclient-script(8) executes.
You may specify multiple -e options on the command line.
|
-r Release the current lease and stop the running DHCP client as previously recorded in the PID file.
When shutdown via this method dhclient-script(8) 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.
|
-x Stop the running DHCP client without releasing the current lease. Kills existing dhclient process
as previously recorded in the PID file. When shutdown via this method dhclient-script(8) will be
executed with the specific reason for calling the script set.
|
-p port
The UDP port number on which the DHCP client should listen and transmit. If unspecified, dhclient
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.
|
-s server-addr
Specify the server IP address or fully qualified domain name to use as a destination for DHCP
protocol messages before dhclient has acquired an IP address. Normally, dhclient 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 (-6) mode.
|
-g relay
Set the giaddr field of all packets to the relay IP address simulating a relay agent. This is for
testing pruposes only and should not be expected to work in any consistent or useful way.
|
--version
Print version number and exit.
Options available for DHCPv6 mode:
|
-S Use Information-request to get only stateless configuration parameters (i.e., without address).
This implies -6. It also doesn't rewrite the lease database.
|
-T Ask for IPv6 temporary addresses, one set per -T flag. This implies -6 and also disables the
normal address query. See -N to restore it.
|
-P Enable IPv6 prefix delegation. This implies -6 and also disables the normal address query. See
-N to restore it. Note only one requested interface is allowed.
|
-N Restore normal address query for IPv6. This implies -6. It is used to restore normal operation
after using -T or -P.
Modifying default file locations: The following options can be used to modify the locations a client uses
for it's files. They can be particularly useful if, for example, DBDIR or RUNDIR have not been mounted
when the DHCP client is started.
|
-cf config-file
Path to the client configuration file. If unspecified, the default ETCDIR/dhclient.conf is used.
See dhclient.conf(5) for a description of this file.
|
-lf lease-file
Path to the lease database file. If unspecified, the default DBDIR/dhclient.leases is used. See
dhclient.leases(5) for a descriptionof this file.
|
-pf pid-file
Path to the process ID file. If unspecified, the default RUNDIR/dhclient.pid is used.
|
--no-pid
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 -r or -x.
|
-sf script-file
Path to the network configuration script invoked by dhclient when it gets a lease. If
unspecified, the default CLIENTBINDIR/dhclient-script is used. See dhclient-script(8) for a
description of this file.
|