Go to main content

Working With DHCP in Oracle® Solaris 11.3

Exit Print View

Updated: October 2017
 
 

DHCP Client Administration

The dhcpagent daemon 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 should not manually start and stop the dhcpagent daemon directly. Instead, as a privileged user on the DHCP client, you can use the ipadm command to affect the dhcpagent daemon's management of the network interface, if necessary.

ipadm Command Options for Working With the DHCP Client

This section summarizes actions that you can accomplish by using ipadm command options. These options are documented in the ipadm(1M) man page.

  • Create the IP interface – The ipadm create-ip command creates the IP interface which you then configure with IP addresses. The addresses can either be static or dynamic. Creating the IP interface is a prerequisite command before you can assign the addresses.

  • Start the DHCP client – The ipadm create-addr -T dhcp DHCP-addrobj command initiates the interaction between the dhcpagent daemon 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 ipadm refresh-addr -i static-addrobj command 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 static IP address, but the 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 systems on the network. This option does not work with DHCP addresses.

  • Request a lease extension – The ipadm refresh-addr DHCP-addrobj command causes dhcpagent to issue a request to renew the lease. The DHCP 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 ipadm delete-addr -r DHCP-addrobj command 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 with a laptop, for example, when leaving a network and planning to start the system on a new network. See also the /etc/default/dhcpagent configuration file RELEASE_ON_SIGTERM property.

  • Release the IP address – The ipadm delete-addr -r DHCP-addrobj command 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 with a laptop, for example, when leaving a network and planning to start the system on a new network.

  • Drop the IP address – The ipadm delete-addr DHCP-addrobj command causes dhcpagent to take down the network interface without informing the DHCP server and cache the lease in the file system. This command enables the DHCP client to use the same IP address when it reboots.


Note -  Currently, the ipadm command has no equivalent functionality for the ifconfig [inet6] interface status command.

Setting DHCP Client Configurations

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.

Configurations for DHCPv4 and DHCPv6

  • The system uses DHCP on one physical network interface.

    If you want to use DHCP on more than one physical network interface, see DHCP Clients With Multiple Network Interfaces.

  • The DHCP client is not automatically configured as a name service client if the DHCP client was configured after the Oracle Solaris installation.

    See DHCP Client and Name Services for information about using name services with DHCP clients.

Default DHCPv4 Configuration

  • The client system does not require a particular host name.

    If you want a client to request a specific host name, see DHCPv4 Client Host Names.

  • Default requests for the client are given in /etc/default/dhcpagent, and includes DNS Server, DNS domain, and broadcast address.

    You can set up the DHCP client's parameter file 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 the dhcpd(8) man page and Working With DHCP Macros (Task Map) in System Administration Guide: IP Services for information about using DHCP server macros to send information to clients.