Contained Within
Find More DocumentationFeatured Support Resources | Download this book in PDF (1691 KB)
Solaris DHCP ClientThe term “client” is sometimes used to refer to a physical machine that is performing a client role on the network. However, the DHCP client described here is a software entity. The Solaris DHCP client is a daemon (dhcpagent) that runs in the Solaris operating environment on a system that is configured to receive its network configuration from a DHCP server. DHCP clients from other vendors can also use the services of the Solaris DHCP server. However, this section describes only the Solaris DHCP client. Notice that the description assumes one network interface. The section DHCP Client Systems With Multiple Network Interfaces discusses issues important for hosts that have two or more network interfaces. DHCP Client InstallationThe Solaris DHCP client is installed and enabled on a system during installation of the Solaris operating environment when you specify that you want to use DHCP to configure network interfaces. You do not need to do anything else on the Solaris client to use DHCP. If you want a system that is already running the Solaris operating environment to use DHCP to obtain network configuration information, see Configuring and Unconfiguring a Solaris DHCP Client. DHCP Client StartupThe dhcpagent daemon obtains configuration information that is needed by other processes involved in booting the system. For this reason, the system startup scripts start dhcpagent early in the boot process and wait until the network configuration information from the DHCP server arrives. The presence of the file /etc/dhcp.interface (for example, /etc/dhcp.hme0 on a Sun Enterprise UltraTM system) indicates to the startup scripts that DHCP is to be used on the specified interface. Upon finding a dhcp.interface file, the startup scripts start the dhcpagent daemon. After startup, dhcpagent waits until it receives instructions to configure a network interface. The startup scripts issue the ifconfig interface dhcp start command, which instructs dhcpagent to start DHCP as described in How DHCP Works. If commands are contained within the dhcp.interface file, they are appended to the dhcp start option of ifconfig. See the ifconfig(1M) man page for more information about options used with the dhcp option. How Solaris DHCP Client Manages Network Configuration InformationAfter the information packet is obtained from a DHCP server, dhcpagent configures the network interface and brings it up, controlling the interface for the duration of the lease time for the IP address. The dhcpagent daemon maintains the configuration data in an internal table held in memory. The system startup scripts use the dhcpinfo command to extract configuration option values from the dhcpagent daemon's table. The values are used to configure the system and enable it to join the network. The agent waits passively until a period of time elapses, usually half the lease time, and then requests an extension of the lease from a DHCP server. If the dhcpagent daemon finds that the interface is down or the IP address has changed, it does not control the interface until it is instructed by the ifconfig command to do so. If the dhcpagent daemon finds that the interface is up and the IP address hasn't changed, it sends a request to the server for a lease renewal. If the lease cannot be renewed, the dhcpagent daemon takes down the interface at the end of the lease time. DHCP Client ManagementThe Solaris DHCP client does not require management under normal system operation. It automatically starts when the system boots, renegotiates leases, and stops when the system shuts down. You cannot manually start and stop the dhcpagent daemon. However, you can use the ifconfig command as superuser on the client system to affect the client's management of the network interface if necessary. ifconfig Command Options Used With DHCP ClientThe ifconfig command enables you to:
DHCP Client Parameter FileThe file /etc/default/dhcpagent on the client system contains tunable parameters for the dhcpagent daemon. You can use a text editor to change several parameters that affect client operation. The file is well documented so you should refer to the file for more information, as well as referring to the dhcpagent man page. DHCP Client ShutdownWhen the system running the DHCP client shuts down normally, the dhcpagent daemon writes the current configuration information to the file /etc/dhcp/interface.dhc. The lease is dropped rather than released, so the DHCP server does not know that the IP address is not in active use. If the lease is still valid when the system reboots, the DHCP client sends an abbreviated request to use the same IP address and network configuration information it had used before the system rebooted. If the DHCP server permits this, the client can use the information that it wrote to disk when the system shut down. If the server does not permit the client to use the information, the client initiates the DHCP protocol sequence described previously and obtains new network configuration information. DHCP Client Systems and Name ServicesSolaris systems support the following name services: DNS, NIS, NIS+, and a local file store (/etc/hosts). Each name service requires some configuration before it is usable. The name service switch configuration file (see nsswitch.conf(4)) must also be set up appropriately to indicate the name services to be used. Before a DHCP client system can use a name service, you must configure the system as a client of the name service. The following table summarizes issues related to each name service and DHCP, and includes links to documentation that can help you set up clients for each name service. Table 7–4 Name Service Client Setup Information for DHCP Client Systems
Client Host Name RegistrationIf you let the DHCP server generate host names for the IP addresses you place in the DHCP service, the DHCP server can register those host names in NIS+, /etc/inet/hosts, or DNS name services. Host name registration cannot be done in NIS because NIS does not provide a protocol to allow programs to update and propagate NIS maps. Note – The DHCP server can update DNS with generated host names only if the DNS server and DHCP server are running on the same system. If a DHCP client provides its host name and the DNS server is configured to allow dynamic updates from the DHCP server, the DHCP server can update DNS on the client's behalf, even if the DNS and DHCP servers are running on different systems. See Enabling Dynamic DNS Updates by DHCP Server for more information about enabling this feature. The following table summarizes client host name registration for DHCP client systems with the various name services. Table 7–5 Client Host Name Registration in Name Services
Note that Solaris DHCP clients can request particular host names in DHCP requests if configured to do so as described in How to Enable a Solaris Client to Request Specific Host Name. Please consult the documentation for non-Solaris clients to determine if the capability is supported. DHCP Client Systems With Multiple Network InterfacesThe DHCP client daemon can manage several different interfaces on one system simultaneously, each with its own IP address and lease time. If more than one network interface is configured for DHCP, the client issues separate requests to configure them and maintains a separate set of network configuration options for each interface. However, although the parameters are stored separately, some of the parameters are global in nature, applying to the system as a whole, rather than to a particular network interface. Options such as hostname, NIS domain name, and timezone are global parameters and should have the same values for each interface, but these values may differ due to errors in the information entered by the DHCP administrator. To ensure that there is only one answer to a query for a global parameter, only the parameters for the primary network interface are requested. You can insert the word primary in the /etc/dhcp.interface file for the interface you want to be treated as the primary interface. |
|||||||||||||||||||||||||||||