DHCP Client Host Names
By default, the Solaris DHCP client does not supply its own host
name, because the client expects the DHCP server to supply the host name.
The Solaris DHCP server is configured to supply host names to DHCP clients
by default. When you use the Solaris DHCP client and server together, these
defaults work well. However, when you use the Solaris DHCP client with some
third-party DHCP servers, the client might not receive a host name from the
server. If the Solaris DHCP client does not receive a host name through
DHCP, the client system looks at the /etc/nodename file for a name to use
as the host name. If the file is empty, the host name
is set to unknown.
If the DHCP server supplies a name in the DHCP Hostname option, the
client uses that host name, even if a different value is placed
in the /etc/nodename file. If you want the client to use a
specific host name, you can enable the client to request that name. See
the following procedure.
How to Enable a Solaris Client to Request a Specific Host Name
- On the client system, edit the /etc/default/dhcpagent file as superuser.
- Find the REQUEST_HOSTNAME keyword in the /etc/default/dhcpagent file and modify the keyword as follows:
If a comment sign (#) is in front of REQUEST_HOSTNAME, remove the #.
If the REQUEST_HOSTNAME keyword is not present, insert the keyword.
- Edit the /etc/hostname.interface file on the client system to add the following
hostname is the name that you want the client to use.
- Type the following commands to have the client perform a full DHCP negotiation
# pkill dhcpagent
# rm /etc/dhcp/interface.dhc
The DHCP data that is cached on the client is removed. The
client restarts the protocol to request new configuration information, including a new host name.
The DHCP server first makes sure that the host name is not
in use by another system on the network. The server then assigns the
host name to the client. If configured to do so, the DHCP server
can update name services with the client's host name.
If you want to change the host name later, repeat Step 3 and Step 4.