Go to main content

Working With DHCP in Oracle® Solaris 11.3

Exit Print View

Updated: October 2017

DHCPv4 Client Host Names

By default, the DHCPv4 client does not supply its own host name because the client expects the DHCP server to supply the host name. The DHCPv4 server is configured to supply host names to DHCPv4 clients by default. When you use the DHCPv4 client and server together, these defaults work well. However, when you use the DHCPv4 client with some third-party DHCP servers, the client might not receive a host name from the server. If the dhcpagent daemon does not receive a host name through the DHCP service, the daemon checks the value that is set in the config/nodename property in the svc:/system/identity:node service 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 DHCP client uses that host name, even if a different value is placed in the value that is set in the config/nodename property in the svc:/system/identity:node service. If you want the DHCP client to use a specific host name, you can enable the client to request that name. See the following procedure.

How to Enable a DHCPv4 Client to Request a Specific Host Name

The following procedure does not work with all DHCP servers because the DHCP server does not have to respect a request for a specific host name and many do not. In some cases, they simply return a different name.

  1. Assume an appropriate role.

    Assume a role that can grant the DHCP Management profile to users. If the DHCP Management profile has not been assigned to a user, assume the root role.

    Roles contain authorizations and privileged commands. For more information about roles, see Creating a Role in Securing Users and Processes in Oracle Solaris 11.3. For more information about the DHCP Management profile, see How to Grant User Access to DHCP Commands.

  2. If the IP interface does not yet exist, create the IP interface.
    # ipadm create-ip interface
  3. If the IP interface already exists with a DHCP address, delete the existing DHCP address.
    # ipadm delete-addr -r DHCP-addrobj
  4. Register a DHCP address with a specific host name that you want to use.
    # ipadm create-addr -T dhcp -h hostname DHCP-addrobj