For When You Can't Have The Real Thing
[ start | index | login ]
start > Sun > DHCP server

DHCP server

Created by dave. Last edited by dave, 11 years and 253 days ago. Viewed 10,044 times. #6
[diff] [history] [edit] [rdf]

Creating a Sun DHCP Server


The Sun GUI DHCP server on Solaris 9 is hopelessly broken. I have wasted a day of time trying to create a scope for the network, only to be told every time that it is missing a table for

root@sun5:/tmp$ pntadm -A -c "sun6-tn" -i 010003BA10DEA9 -m sun5 -y
pntadm: Table for does not exist.

I am not trying to create a table for, I want one for I've set /etc/netmasks, and nothing. This piece of junk obviously has some hard-coded assumptions about netmasks that are making it impossible to work with. Get the ISC dhcpd; in the long run, you'll be glad you did.

Using the dhcp manager:

  1. Set your X display.
  2. As root:
    # /usr/sadm/admin/bin/dhcpmgr
  3. Define your server options.
  4. Create a network to add leases to.
  5. Reservations:
    # pntadm -A $IPADDR -c "$COMMENT" -i $ID -m $MACRO -y $NETWORK
    -A $IPADDRadd the ipaddress $IPADDR as the reserved IP
    -c "$COMMENT"a comment describing this computer
    -i $IDthe client identifier, usually 01$MAC, where $MAC is the computer's ethernet address, without colons, any letters in the MAC must be CAPS
    -m $MACRO -ythe set of lease options to use (routers, DNS servers, lease timeouts etc), in most cases this defaults to the name of the dhcp server
    the -y parameter checks that the specified macro exists before adding the client defintion
    $NETWORKthe network to add this reservation to
    # pntadm -A -c "netra 7" -i 010003AB107785 -m sunserver -y
Doing Things Through The Command Line:

(This section heavilly based on >>this page.)

  1. 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
    Note that this step started the dhcp server for me before I wanted it started, so I had to manually stop it:
    # /etc/init.d/dhcp stop
  2. create a macro for our local network ( the one we will serve IP addresses for) in dhcptab
    # dhtadm -A -m -d ':Broadcst='
  3. Create the local network table
    # pntadm -C
  4. Add a reservation:
    # pntadm -A -c "sun6-tn" -i 010003BA10DEA9 -m sun5 -y
    Repeat as desired.
  5. Add a nonreserved address:
    # pntadm -r SUNWfiles -p /var/dhcp -A
    Repeat as desired.
  6. Start your dhcp server:
    # /etc/init.d/dhcp start

More Comment: Note that this example is precisely the situation I was complaining about at the top of the page and it all works properly. It does create the table as /var/dhcp/SUNWfiles1_10_0_0_0 (not SUNWfiles1_10_1_0_0 as you might expect) but it does have the correct networking information inside it). How this might affect your ability to serve addresses in a neighbouring scope (ie another subnet of the 10/8 network) I don't know, but this method works for me. Overall, though, I'd personally stick with the ISC DHCPD wherever possible.

Clearly the problem is with the GUI administration tool's wizard not being able to create the correct table file for you when you enter a non-standard network base. This is probably a bug. (Question for any (or all) of my Sun readers -- how do I go about verifying/reporting this bug?

Update 0710.11:

Email from Catherine Button:

Having run into this problem myself, here's how I fixed it AND was able to use a whole bunch of different 10.x.x.x subnets on the dhcp server:

Change the netmasks file on the machine /etc/netmasks so that this entry is first:
AND ALSO change the netmasks file in NIS(nisplus)if you use that, even if it's not first in nsswitch.conf

Presto, gui works, file names back to normal.

Unconfirmed by me (our need for the Sun DHCP server has gone away), but useful to know for the future.
no comments | post comment
This is a collection of techical information, much of it learned the hard way. Consider it a lab book or a /info directory. I doubt much of it will be of use to anyone else.

Useful: | Copyright 2000-2002 Matthias L. Jugel and Stephan J. Schmidt