Intro.
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.
Packages
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)
Procedure
- Create basic DHCP configuration and dhcptab files
- Create a macro for the local network
- Create the local network table
- Add some entries to the network table
- 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 dhcptab
# dhtadm -A -m 192.9.200.0 -d ':Broadcst=192.9.200.255:Subnet=255.255.255.0:MTU=1500:'
3. Create the local network table
# pntadm -C 192.9.200.0
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 192.9.200.201 192.9.200.0
# pntadm -r SUNWfiles -p /var/dhcp -A 192.9.200.202 192.9.200.0
# pntadm -r SUNWfiles -p /var/dhcp -A 192.9.200.203 192.9.200.0
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 options;
# /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.
I hope you found this FAQ to be of some use. It would be most helpful if you
could rate it below. All fields are optional...
Please do not use this form to seek free technical
assistance - Try AllExperts...
|