INSTALL AT YOUR OWN RISK!  MAKE SURE YOU HAVE BACKUPS (ESPECIALLY TO /ETC/HOSTCONFIG AND /ETC/NETINFO) THAT YOU CAN RESTORE IF THINGS DON'T GO AS YOU EXPECT.

A.  BACKGROUND.  This is an NeXTSTEP installer package (Intel hardware only) for ISC's beta version of DHCP, which installs necessary bpf, dhcp, and related stuff.  There is a separate installer for Black hardware, which I have successfully tested on NeXTSTEP 3.3. I don't have the ability to test it on INTEL, so this Intel port is UNTESTED.  THE MAIN PROBLEM IN GETING dhcp TO WORK WILL BE IN GETTING THE FILE /etc/dhclient.conf CORRECTLY CONFIGURED (see step 4 below for more).   A separate build was done for OPENSTEP and uploaded to the OPENSTEP peak archive, although the NeXTSTEP versions should work on OPENSTEP.

The source is based on ISC's port of DHCP (http://www.isc.org/; dhcp version 2.0, beta 1, patch level 14), with a patch by Eric Norum installed which causes netinfo's /machines directory to be searched for an ethernet address for your host machine.

This package installs the following:
---Berkeley Packet Filter (BPF) Loadable Kernel Server, and four device files (/dev/bpf0 - /dev/bpf3)
---dhcp binaries, related files, and man pages.
---/etc/dhclient.conf, /etc/dhclient-script, and /etc/dhclient.leases
---backs up your current /etc/rc.local and then modifies /etc/rc.local to load the BPF LKS and dhclient binary during bootup.

For a complete list of things installed, use the Installer "List" button.

If you follow the directions  below, during bootup bpf and dhclient will load, and if booting verbosely you'll see something like:

	Listening on BPF/en0/00:00:0f:62:06:01/unattached
	Sending on   BPF/en0/00:00:0f:62:06:01/unattached

after which you'll see some lines detailing the DHCPDISCOVER progress. If for some reason dhcp can't negotiate, after about a minute you'll get a message that the database is sleeping, and your machine will finish its normal boot (although there will be no dhcp connection). If a lease is negotiated, you'll see data on this (which will be written also to /etc/dhclient.leases) and the boot will finish normally. 

If things aren't correct in the netinfo database you'll see something like:
	Listening on BPF/en0/<null>/unattached


B.  GENERAL INSTALLATION INSTRUCTIONS:  Log in as root; install the package; modify /etc/dhclient.conf; use NetInfoManager.app to add your machine's ethernet address to the /machines entry for your host; modify /etc/hostconfig; and reboot.  Backup system files/directories before making any changes (eg., /etc/netinfo and /etc/hostconfig)!

C.  CONFIGURATION:
1) The file /etc/dhclient.conf is a dummy which needs modification, ie you MUST set up /etc/dhclient.conf.  You should probably be able to leave it empty; if this does not work, you'll have to get specific configuration information from your cablemodem company and play around a bit.  A simple entry like

send host-name "yourhostname";
send dhcp-client-identifier 00:00:0f:62:06:01;

may work in this case.  NOTE that the "" quotation marks in the send host-name line ARE required by the script to quote a string; there ARE NO QUOTE MARKS surrounding the ethernet address in the send dhcp-client-identifier line.  Generally, use quote marks for strings, and no quote marks for hex data.

In configuring my own dhclient.conf file, I found that for my cablemodem service, I had to use my hostname for the dhcp-client-identifier, so my /etc/dhclient.conf is a single line like this (note that this is NOT the default file installed in /etc/dhclient.conf):

send dhcp-client-identifier "myassignedhostname";

2) the file /etc/dhclient-script is installed and should be fine as is.  There is a man page for this script if you need to modify it (but again, this script is probably just fine as is).  If you are having problems, it is most likely with /etc/dhclient.conf or your netinfo setup, NOT this script.


3) The dhclient program usually needs to send your machine's Ethernet hardware
address as part of the DHCP request packets (although some cablemodem providers  don't like storing ethernet card identfiers and want the assigned hostname as the identifier; see step 1 above).  Eric Norum provided a workaround patch which lets dhclient read the Ethernet address from the en_address property of the Netinfo database.  Check the entry for your host in NetInfo's /machines directory (create one if it isn't there) in NetInfoManager.app and make sure the `en_address' field is correct for your machine.  Also make sure that one of the name values for this host is the value given you by your cablemodem company.  You must use the Ethernet address indicated by a verbose boot (that is, don't pad the address with leading zeros).  I used NetInfoManager to leave the ip_address value empty (ie, the property key is there, but the value is empty).


4) Here is the /etc/hostconfig I used:

HOSTNAME=YOURHOSTNAME
INETADDR=-NO-
ROUTER=-NO-
IPNETMASK=255.255.255.0
IPBROADCAST=
YPDOMAIN=-NO-
NETMASTER=-NO-
TIME=-AUTOMATIC-


Thanks to Eric Norum for his patch and suggestions in compiling this version.

J. P. McCann
jpmeia@ix.netcom.com
22 FEB 1999