Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Standard view
Full view
of .
Look up keyword
Like this
0 of .
Results for:
No results containing your search query
P. 1
Configure DHCP in Solaris

Configure DHCP in Solaris

Ratings: (0)|Views: 634 |Likes:
Published by api-3738724

More info:

Published by: api-3738724 on Oct 15, 2008
Copyright:Attribution Non-commercial


Read on Scribd mobile: iPhone, iPad and Android.
download as DOC, PDF, TXT or read online from Scribd
See more
See less






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.

The dhcp server setup here serves a single network, makes no effort to register names in
any naming service, and does not enable BOOTP.
You should have the 3 basic DHCP packages installed;

# 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

1. Basic DHCP Configuration
Use dhcpconfig to setup dhcpsvc.conf and dhcptab, here we simply define the type of
datastore (SUNWfiles = text files) and the location of datafiles;
# dhcpconfig -D -r SUNWfiles -p /var/dhcp
2. Create a macro for the local network
Here we create a macro for our local network ( the one we will serve IP addresses for) in
# dhtadm -A -m -d
3. Create the local network table
# pntadm -C
4. Add some entries to the network table
Here we define three local IP address that will be leased out by the dhcp server...

# pntadm -r SUNWfiles -p /var/dhcp -A # pntadm -r SUNWfiles -p /var/dhcp -A # pntadm -r SUNWfiles -p /var/dhcp -A

5. Start the DHCP server
Use the standard init.d boot script and watch /var/adm/messages for problems;
# sh /etc/init.d/dhcp start
If you have problems stop the daemon and run it manually with the debug & verbose

# /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

What is DHCP?

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.

DHCP client support is present in most modern operating systems - include MS
Windows, Linux, Solaris, HP-UX etc.

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.)

This page assumes thatle0 is the interface you using for your DHCP connection.
Substitutehme0 or whatever interface you're actually using in the examples below.
Setting up DHCP
There are two ways of using DHCP:
DHCP has limited control
DHCP has full control
The first case may be where you want to use your own/etc/resolv.conf and so
on, with a minimum of hassle.

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

INTERFACE variables as required.
The first thing to do is to create an empty/etc/hostname.le0, like this:
> /etc/hostname.le0
Creating this file ensures that the interface gets plumbed, ready for the DHCP
software to do its stuff.
Next, you create/etc/dhcp.le0. This file can be empty if you want to accept the
defaults, but may also contain one or both of these directives:
waittime, 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.

Activity (13)

You've already reviewed this. Edit your review.
1 hundred reads
1 thousand reads
jeya thilagan liked this
praveen_as liked this
jaya5698 liked this
suresha2lu liked this
rhcescna liked this
Sesha Maruthi liked this
nenjams liked this

You're Reading a Free Preview

/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->