System Administration Guide: IP Services

DHCP Client Systems and Name Services

Solaris 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

Name Service  

Client Setup Notes 


If you are installing the Solaris operating environment on a client system by using Solaris DHCP, you can use a configuration macro that contains the NISservs and NISdmain options to pass the IP addresses of NIS servers and the NIS domain name to the client. The client then automatically becomes a NIS client.

If a DHCP client system is already running the Solaris operating environment, the NIS client is not automatically configured on that system when the DHCP server sends NIS information to the client. 

If the DHCP server is configured to send NIS information to the DHCP client system, you can see the values given to the client if you use the dhcpinfo command on the client as follows:

# /sbin/dhcpinfo NISdmain

# /sbin/dhcpinfo NISservs

Use the values returned for the NIS domain name and NIS servers when you set up the system as a NIS client.  

You set up a NIS client for a Solaris DHCP client system in the standard way, as documented in “Setting Up and Configuring NIS Service” in System Administration Guide: Naming and Directory Services (DNS, NIS, and LDAP).

Note –

You can write a script that uses dhcpinfo and ypinit to automate NIS client configuration on DHCP client systems.


If the DHCP client system receives a nonreserved IP address (the address may not always be the same), you must set up the NIS+ client for a DHCP client system in a nonstandard way, which is documented in Setting Up DHCP Clients as NIS+ Clients. This procedure is necessary because NIS+ uses security measures to authenticate requests for service. The security measures depend upon the IP address.

If the DHCP client system has been manually assigned an IP address (the client's address is always the same), you can set up the NIS+ client in the standard way, which is documented in “Setting Up NIS+ Client Machines” in System Administration Guide: Naming and Directory Services (FNS and NIS+)


You must set up the /etc/inet/hosts file for a DHCP client system that is to use /etc/inet/hosts for its name service.

The DHCP client system's host name is added to its own /etc/inet/hosts file by the DHCP tools. However, you must add the host name manually to the /etc/inet/hosts files of other systems in the network. If the DHCP server system uses /etc/inet/hosts for name resolution, you must also add the client's host name manually on the system.


If the DHCP client system receives the DNS domain name through DHCP, the client system's /etc/resolv.conf file is configured automatically. To actually use DNS on systems that use /etc/inet/hosts files, you must modify the /etc/nsswitch.conf file to add dns to the hosts line. See “Adding and Deleting Clients” in System Administration Guide: Naming and Directory Services (DNS, NIS, and LDAP) for more information about DNS clients.

If the client system uses NIS or NIS+ for local name resolution, you should be aware of the following:  

  • NIS – If the NIS server allows DNS forwarding (which it does by default), the NIS client system can also use DNS. No further DNS client setup is needed in this case. If the NIS server does not allow DNS forwarding, the client system can use DNS by becoming a DNS client as described in “Adding and Deleting Clients” in System Administration Guide: Naming and Directory Services (DNS, NIS, and LDAP). Note that if the client receives the DNS domain name from the DHCP server, the /etc/resolv.conf file needed for a DNS client is configured automatically, so you need only be concerned with the nsswitch.conf file.

  • NIS+ – The NIS+ client system can be configured to also use DNS if you edit the nsswitch.conffile to add dns to the hosts line.

Client Host Name Registration

If 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


Who Registers Host Name 

Name Service 

DHCP Generated Host Name 

DHCP Client Supplied Host Name 


NIS Administrator 

NIS Administrator 


DHCP tools 

DHCP tools 


DHCP tools 

DHCP tools 


DHCP tools, if the DNS server runs on the same system as the DHCP server. 

DNS Administrator, if the DNS sever runs on a different system. 

DHCP server, if configured for dynamic DNS updates.  

DNS Administrator, if DHCP server is not so configured. 

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.