Solaris DHCP Administration Guide

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 1–4 Name Service Client Setup Information for DHCP Client Systems

Name Service  

Client Setup Notes 

NIS 

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 “Configuring NIS Service” in Solaris Naming Setup and Configuration Guide.


Note –

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


NIS+ 

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 “Configuring NIS+ Clients” in Solaris Naming Setup and Configuration Guide

/etc/inet/hosts

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.

DNS  

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, as shown in “Default nsswitch.files File” in Solaris Naming Setup and Configuration Guide

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

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 1–5 Client Host Name Registration in Name Services

 

Who Registers Host Name 

Name Service 

DHCP Generated Host Name 

DHCP Client Supplied Host Name 

NIS 

NIS Administrator 

NIS Administrator 

NIS+ 

DHCP tools 

DHCP tools 

/etc/hosts

DHCP tools 

DHCP tools 

DNS 

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.