Setting up a Sun Solaris Server to receive its IP address from a DHCP Server is fairly straight forward and is infact just a matter of setting up files on your Solaris Server.

Ensure that every interface that is up and connects to a network has a file /etc/hostname.interface file created say /etc/hostname.pcn0 where pcn0 is my network interface. If they are not found the create a file as follows:

solaris10# touch /etc/hostname.pcn0

where pcn0 is my network interface card.

dhcpagent is the dhcp client thats running on your Solaris operating system. With this in place create the following file:

Again, if there are more than one network interface and if each of these receive IP Address from DHCP servers in their networks then a /etc/dhcp.<interface> file has to be created for each of these interfaces.

The system by default waits for 30 seconds for the DHCP Server to respond. However, this can be modified by entering the wait time in the dhcp.<interface> file. For instance, if I decide to let my solaris server wait for 90 seconds then enter the wait time as follows

solaris10# cat /etc/dhcp.pcn0wait 90

If it is a primary interface then this can be mentioned as follows

solaris10# cat /etc/dhcp.pcn0wait 90
primary

This should make your Sun Solaris Server a DHCP client to receive IP Address from a DHCP Server. For more customisation options click here

I had put a second NIC in the machine because the first NIC driver was AWOL. When I created the dhcp. file, Solaris was always trying to use the AWOL NIC for DHCP. The “primary” keyword in the second dhcp.interface file made everything spiffy.