This document provides a simple guide to configuring a Solaris system as a DHCP server
using the software supplied with the operating system. The command line interface is
used thoughout, no reference made to the Sun's GUI tool 'dhcpmgr'. This procedure was
performed on a Solaris 9 system, though it is likely also applicable to Solaris 7 & 8.
# pkginfo | grep DHCP
system SUNWdhcsb Binary File Format Data Module for BOOTP/DHCP Services
system SUNWdhcsr BOOTP/DHCP Server Services, (Root)
system SUNWdhcsu BOOTP/DHCP Server Services, (Usr)
1. Create basic DHCP configuration and dhcptab files
2. Create a macro for the local network
3. Create the local network table
4. Add some entries to the network table
5. Start the DHCP server
# pntadm -r SUNWfiles -p /var/dhcp -A 184.108.40.206 220.127.116.11 # pntadm -r SUNWfiles -p /var/dhcp -A 18.104.22.168 22.214.171.124 # pntadm -r SUNWfiles -p /var/dhcp -A 126.96.36.199 188.8.131.52
# /usr/lib/inet/in.dhcpd -dv
3fe143d6: Daemon Version: 3.5
3fe143d6: Maximum relay hops: 4
3fe143d6: Run mode is: DHCP Server Mode.
3fe143d6: Datastore resource: SUNWfiles
DHCP is used to automatically configure network parameters on client workstations.
Whilst it can be used to configure any and every known network parameter it is typically
used simply to automatically allocate IP addresses and deliver static information such as
the addresses of network routers and DNS servers.
One of the problems that can arise when trying to use a Solaris box as a DHCP
client is that by default, the server is expected to supply a hostname, in addition
to all the other stuff (like IP address, DNS servers, etc.). Most cable modems and
home routers don't supply a (usable) hostname, so it gets set to "unknown". This
page describes how to get around that. (Where this page says "cable modem",
"DSL modem" can be substituted.)
The second case would be the normal situation, especially if your cable modem
provider has a habit of changing DNS name server IP addresses on you (like
mine does!), so I'll concentrate on that here. I have ascript to automate the first
method, should you want to use it. You'll need to change theDEFAULT_ADDR and
By default,ifconfig will wait 30 seconds for the DHCP server to respond (after
which time, the boot will continue, while the interface gets configured in the
background). Specifying thewait directive tellsifconfig not to return until the
DHCP has responded.time can be set to the special value offorever, with
obvious meaning. I use atime value of 300, which seems to be long enough for
my cable provider.
This action might not be possible to undo. Are you sure you want to continue?