Andrzej Popielewicz Phd

Applied Informatics Division
Institute of Physics UAM 
Download| Contact 

Solaris 9 x86 : DHCP "unknown" hostname problem

Method 1

The reason , that hostname is set to "unknown" is the fact , that dhcpinfo does not return hostname as expected by system scripts. This is why we propose to change two system scripts :


The first of these scripts calls another script


You have to understand how this script works. The idea is the following : my ISP provider assigns the following hostname to my Solaris box connected via cable modem : , where is unique domain name and c20-130 is created from IP address , in my example the IP was It  means the permanent part 62.21 is omitted and replaced by corresponding domain and the rest corresponding to my host is added. You have to change this part in script which is ISP provider specific, for example and the convention to create the rest of hostname. You may for example choose  to set hostname equal to IP address.

Warning : make backup of above two system scripts. Learn recovery procedure before applying these changes. You cannot build in any syntax errors into these scripts. Please test in /sbin/sh environment, and not for example in bash.

Reboot the system after applying these changes.

Method 2

In this method no system scripts are changed. Two scripts are added :

It is the same script used in method 2. Then the second script is


Notice the second script has the same name as original /sbin/dhcpinfo program. Thus before copying this script from the supplied archive into /sbin directory do the following

cd /sbin
mkdir backup
cp dhcpinfo backup
cp dhcpinfo olddhcpinfo

The same remarks as above concerning customizing of apply  also in this case. Reboot the system after adding these two scripts.

As a result You  should obtain hostname set to the real hostname, assigned to Your PC by Your provider's DHCP server, and under which Your computer is visible/accessible from the Internet  

Document created on  5.1.2004