DHCP Client Administration
The Solaris DHCP client software does not require administration under normal system operation.
The dhcpagent daemon automatically starts when the system boots, renegotiates leases, and stops
when the system shuts down. You cannot manually start and stop the dhcpagent
daemon directly. However, as superuser on the client system, you can use the
ifconfig command to affect dhcpagent's management of the network interface, if necessary.
ifconfig Command Options Used With the DHCP Client
The ifconfig command enables you to do the following:
Start the DHCP client – The command ifconfig interface dhcp start initiates the interaction between dhcpagent and the DHCP server to obtain an IP address and a new set of configuration options. This command is useful when you change information that you want a client to use immediately, such as when you add IP addresses or change the subnet mask.
Request network configuration information only – The command ifconfig interface dhcp inform causes dhcpagent to issue a request for network configuration parameters, with the exception of the IP address. This command is useful when the network interface has a valid IP address, but the client system needs updated network options. For example, this command is useful if you do not use DHCP to manage IP addresses, but you do use it to configure hosts on the network.
Request a lease extension – The command ifconfig interface dhcp extend causes dhcpagent to issue a request to renew the lease. The client does automatically request to renew leases. However, you might want to use this command if you change the lease time and want clients to use the new lease time immediately, rather than waiting for the next attempt at lease renewal.
Release the IP address – The command ifconfig interface dhcp release causes dhcpagent to relinquish the IP address used by the network interface. Release of the IP address happens automatically when the lease expires. You might want to issue this command if the lease time is long and you need to take down the network interface for an extended period of time. You should use this command when you remove the system from the network.
Drop the IP address – The command ifconfig interface dhcp drop causes dhcpagent to take down the network interface without informing the DHCP server. This command enables the client to use the same IP address when it reboots.
Ping the network interface – The command ifconfig interface dhcp ping lets you determine if the interface is under the control of DHCP.
View the DHCP configuration status of the network interface – The command ifconfig interface dhcp status displays the current state of the DHCP client. The display indicates the following items:
If an IP address has been bound to the client
The number of requests sent, received, and declined
If this interface is the primary interface
Times when the lease was obtained, when it expires, and when renewal attempts are scheduled to begin
For example:
# ifconfig hme0 dhcp status
Interface State Sent Recv Declined Flags
hme0 BOUND 1 1 0 [PRIMARY]
(Began,Expires,Renew)=(08/16/2005 15:27, 08/18/2005 13:31, 08/17/2005 15:24)
Setting DHCP Client Configuration Parameters
The /etc/default/dhcpagent file on the client system contains tunable parameters for the dhcpagent.
You can use a text editor to change several parameters that affect client
operation. The /etc/default/dhcpagent file is well documented, so for more information, you should refer
to the file as well as to the dhcpagent(1M) man page.
The /etc/dhcp.interface file is another location in which parameters affecting the DHCP client
are set. Parameters set in this file are used by system startup scripts
with the ifconfig command.
By default, the DHCP client is configured as follows:
The client system uses DHCP on one physical network interface.
If you want to use DHCP on more than one physical network interface, see DHCP Client Systems With Multiple Network Interfaces.
The client system does not require a particular host name.
If you want a client to request a specific host name, see DHCP Client Host Names.
The client is not automatically configured as a name service client if the DHCP client was configured after the Solaris installation.
See DHCP Client Systems and Name Services for information about using name services with DHCP clients.
The client requests only the subnet mask, router IP address, client host name, and encapsulated vendor options.
The DHCP client's parameter file can be set up to request more options in the PARAM_REQUEST_LIST keyword in the /etc/default/dhcpagent file. The DHCP server can be configured to provide options that were not specifically requested. See About DHCP Macros and Working With DHCP Macros (Task Map) for information about using DHCP server macros to send information to clients.