©2015 - 2022 Chad’s Technoworks. Disclaimer and Terms of Use

Chad’s TechnoWorks My Journal On Technology

Broadband Router DHCP only provides IP but not hostname. Thus, the Solaris will indicate "hostname unknown" during boot-up or on the Welcome screen. You can provide a permanent hostname that would go along the DHCP IP through the following:


1. Set /etc/nodename file to have entry of your hostname (mine was sunws150):


$ vi /etc/nodename       


sunws150



2. set interface hostname (/etc/hostname.eri0) to have entry:


 inet sunws150

  


3. Modify /etc/default/dhcpagent to set or replace the entries in order to remove request for hostname on dhcp server (your broadband router):


REQUEST_HOSTNAME=no


# By default, a parameter request list requesting a subnet mask (1),

# router (3), DNS server (6), hostname (12), DNS domain (15), broadcast

# address (28), and encapsulated vendor options (43), is sent to the DHCP

# server when the DHCP agent sends requests.  However, if desired, this

# can be changed by altering the following parameter-value pair.  The

# numbers correspond to the values defined in RFC 2132.

#

#PARAM_REQUEST_LIST=1,3,6,12,15,28,43

PARAM_REQUEST_LIST=1,3,6,15,28,43



4. On certain cases, you may fix the automountd config files to indicate proper host.

    Replace the hostname 'unknown' found in the /etc/auto_home file with your hostname.


 Example:


 UNIX>cat auto_master

 #

 # Copyright 2003 Sun Microsystems, Inc.  All rights reserved.

 # Use is subject to license terms.

 #

 # ident "@(#)auto_master        1.8     03/04/28 SMI"

 #

 # Master map for automounter

 #

 +auto_master

 /net            -hosts          -nosuid,nobrowse

 /home           auto_home       -nobrowse


 UNIX> cat auto_home

 #

 # Copyright 2003 Sun Microsystems, Inc.  All rights reserved.

 # Use is subject to license terms.

 #

 # ident "@(#)auto_home  1.6     03/04/28 SMI"

 #

 # Home directory map for automounter

 #

 +auto_home

 chad unknown:/export/home/chad



 The above entries indicate that dir chad that is auto mounted at /home is located at unknown:/export/home/chad. Replace the entry 'unknown' with your hostname (sunws150).


 If this was not set, the following error occurs at console and /var/adm/messages


 Mar 23 23:13:42 sunws150 automountd[354]: [ID 784820 daemon.error] server unknown not responding    


5. Optionally add loghost alias to localhost


vi /etc/hosts

#

# Internet host table

#

127.0.0.1       localhost  loghost

192.168.1.99    sunws150        # Added by DHCP




How To Configure Hostname In Solaris DHCP On Broadband Home Network

Information Technology