Setting Up a DHCP Client for the Solaris 10 OS or Microsoft Windows
Victor Feng, May 2008
This tech tip provides tips and tricks for setting up a DHCP client for the Solaris Operating System or Microsoft Windows XP with a DHCP server that runs either the Solaris 10 OS for SPARC platforms or Microsoft Windows 2003.
The following three, tested scenarios are described.
- DHCP client on Solaris 10 OS for x86 platforms with DHCP server on Solaris 10 OS for SPARC platforms
- DHCP client on Microsoft Windows XP with DHCP server on Solaris 10 OS for SPARC platforms
- DHCP client on Solaris 10 OS for x86 platforms with DHCP server on Microsoft Windows 2003
Also, see the additional information in the Notes section.
1. DHCP Client on Solaris 10 OS for x86 Platforms With DHCP Server on Solaris 10 OS for SPARC Platforms
If we install a fresh copy of the Solaris 10 OS for x86 platforms, we can easily choose the option DHCP for networking during the installation. Remember to uncomment
RELEASE_ON_SIGTERM=yes in
/etc/default/dhcpagent so the IP address will be released when the machine is shut down.
If the machine was using a static IP address, you can use one of following two methods:
Manual method:
a. Run the following commands, where
elxl0 is the name of the NIC interface:
> touch /etc/dhcp.elxl0
> touch /etc/hostname.elxl0
Creating an empty
/etc/hostname.elxl0 is a task you might not be aware of, because some documents suggest that you leave
/etc/hostname.elxl0 alone in case you change the machine back to use a static IP address.
b. Uncomment
RELEASE_ON_SIGTERM=yes in
/etc/default/dhcpagent.
Method using the
sys-unconfig command
a. Run the following command:
> sys-unconfig
b. Uncomment
RELEASE_ON_SIGTERM=yes in
/etc/default/dhcpagent.
The
sys-unconfig command removes all network information, reboots the machine, and asks for information such as the network and root password. The
sys-unconfig command creates an empty
/etc/hostname.elxl0 file for the DHCP client.
Remember to specify DNS information (for both the manual method and the
sys-unconfig method).
2. DHCP Client on Microsoft Windows XP With DHCP Server on Solaris 10 OS for SPARC Platforms
Here we consider a Microsoft Windows XP machine that was joined to a Microsoft Windows domain.
a. Log in to the local machine as administrator.
b. Click Start.
c. Right-click My Computer and select Properties.
d. Click Computer Name.
e. Click Change.
f. Click Workgroup. You will be asked for domain administrator and password.
g. Specify a computer name, click OK, and then restart the machine.
h. Configure the Internet Protocol (TCP/IP) properties, and specify the preferred DNS server addresses.
i. Run the
ipconfig /release and
ipconfig /renew commands.
3. DHCP Client on Solaris 10 OS for x86 Platforms With DHCP Server on Microsoft Windows 2003
After setting up the DHCP client using one of methods mentioned in scenario 1, many people report that everything worked except the host name assignment. Parameters such as the IP address, submask, and default router are assigned, but the host name is not assigned. Therefore, the client's name is
unknown.
The solution is to do the following:
a. Add an entry
inet <hostname> in
/etc/hostname.elxl0.
b. Add an entry
<hostname> in
/etc/nodename.
Notes
- A DHCP client for both the Solaris OS and Microsoft Windows needs to specify its DNS information.
- After configuring a DHCP server on the Solaris 10 OS, I had to reboot the OS so the DHCP client could work with it.
- Every time the
sys-unconfigcommand was executed, the machine (a Dell OptiPlex GX240) could not reboot. I had to power down the machine and power it up, and then the machine asked for the input interactively. - If a DHCP server with IP address 10.1.4.33 has multiple NICs, for example,
e1000g0with IP address 10.1.4.33 andeg1000g1with IP address 10.1.4.34, the Microsoft Windows client might report that the DHCP server's IP address is 10.1.4.34.