SUMMARY: DHCP and Solaris 2.6

From: Marco Greene (
Date: Tue Jul 20 1999 - 07:56:04 CDT

Sun Managers,
        My DHCP problem has been solved. Thanks to Dave Miner, Casper Dik and
Arthur Darren Dunham.

        The all pointed out the fact that you need to leave you file
empty for the interface where dhcp is going to be used. For the second part
of my problem Dave pointed out that there is a mistake in the startup files.
He could point it out exactly because he didn't have a Solaris 2.6 system on
hand. This was also my first thought but I looked in the inetsvc file which
also deals with hostname. I couldn't figure it out. However, with Dave's
suggestion in mind I revisited the startup files and found the problem in

The first thing that rootusr will do is see if it can get a hostname from
the dhcp configuration information. If this command succeeds (ie dhcpagent
is running) and the hostname variable length is still 0, the system will
assign hostname="unknown". The next few lines also assign the hostname but
in the event that it has not already been assigned. When DHCP is running
the hostname is always assigned by this point in time so these lines will be

In order to fix the problem I was having I commented out the DHCP assigned
hostname section. However be carefull when you do this. It is required for
that your current hostname has a corresponding IP address in the
/etc/inet/hosts file. (This is taken care of later during the bootprocess
in inetsvc.) If this is not the case, several things will not work such as
tooltalk, in.dhcpd, snmpdx.

Thanks again for all of your help....

My Original posting:
Fellow SM,
    I have a Solaris 2.6 machine (latest recommended patches) running with
two interfaces. One of them has a fixed IP address on a private network:
10.1.1.x. The other...elxl1...get's its IP address from a dhcp server.
This is what I have done so far:

1) Created the file /etc/dhcp.elxl1 - Rebooted and the machine tried to
start DHCP on that interface...however, it said that the interface was not

2) Created a file /etc/hostname.elxl1 and put an address of on the
first line. Now when I reboot, the system complains about an invalid
address.....but DHCP then starts and assigns a valid address.

I have two questions:
1) When DHCP is running, it assigns a hostname of unknown even though I
have one assigned through the first interface elxl0. How do I assign a
hostname that this machine will keep?

2) Is there anyway of cleaning up to boot process so that the system
doesn't complain about an invalid address being assigned? It there a
"proper" way of doing the DHCP client setup?

I have looked at the following resources to no avail:
Sun Managers archives
Sun Managers FAQ

Will summarize,

This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:13:23 CDT