mcmahill@alum.mit.edu
This document attempts to explain how to setup DHCP clients and servers for the NetBSD/mac68k operating system.
DHCP stands for Dynamic Host Configuration Protocol. It allows dynamic configuration of the network configuration of a host computer. The basic idea is this: When a DHCP client is turned on, it initially doesn't have an IP address assigned to it. It issues a broadcast message to any DHCP servers which are on the network. An exchange takes place during which the DHCP server assigns an IP address to the client and tells the client certain key network configuration parameters (such as name server addresses for example).
Many internet service providers (ISP's) require the use of DHCP. Another use is for laptop computers which may be connected to more than one network. For example a laptop may be connected to a network in the office and also at home. This is an ideal use for DHCP as the laptop doesn't need to be manually reconfigured for use in the 2 different networks.
I don't claim to be an expert (or anything resembling an expert for that matter) on DHCP. There is, however, detailed information available on the web. The defining document is RFC 1541, Request for Comments document for the Dynamic Host Configuration Protocol (DHCP). In addition there is a comprehensive DHCP FAQ.
Although I try to verify that the information contained within this HOWTO is correct, I accept no responsibility for loss or damage caused by the use of the information contained within this HOWTO.
This HOWTO is Copyright (c), 1998 by Dan McMahill.
Please send all additions, suggestions, and corrections to Dan McMahill <mcmahill@alum.mit.edu>. If making a correction, please do not send a copy of the entire HOWTO. Just send the relevant text from the HOWTO plus the corrected text.
The following people have contributed to the DHCP HOWTO:
This section attempts to explain how to setup DHCP clients under NetBSD/mac68k. This document was written for NetBSD-1.3.
Edit /etc/netstart.local and add the line
dhclient sn0. Substitute ae0 for
sn0 if that's your ethernet driver. You should be
able to see what driver you have during the NetBSD boot sequence
or by looking at the output of dmesg. This causes
the DHCP client software to be automatically started during the
boot sequence.
/etc/dhclient.conf file. Remember to customize
this as needed, ie: change the hostname stuff and the ethernet interface.
A typical /etc/dhclient.conf is shown below.
send host-name "myname.my.domain"; <=== Put your
hostname here.
send dhcp-client-identifier "myident"; <=== Put your host
identifier here.
(this is often times
the same as myname).
request subnet-mask, broadcast-address, routers,
domain-name-servers;
timeout 30;
retry 60;
select-timeout 5;
script "/etc/dhclient-script";
lease {
interface "sn0"; <=== put your interface
device here.
option host-name "myname.my.domain"; <=== put your
hostname here
option subnet-mask 255.255.255.0;
option domain-name "my.domain"; <=== put your
domain name here
option domain-name-servers 127.0.0.1;
renew 2 2000/1/12 00:00:01;
rebind 2 2000/1/12 00:00:01;
expire 2 2000/1/12 00:00:01;
}
See dhcp-options(5) and dhclient.conf(5) for more
information.
If you have more than 1 network card in your machine, you need to
edit the /etc/dhclient-script file to avoid a bug which
generates a large log file. Basically, the idea is to make
dhclient-script exit without doing anything when called on the network
card which doesn't have DHCP running on it.
For example, on my machine, I have two network cards. I run DHCP on
the ae1 network card and do not run DHCP on
ae0. For this example, add the following lines to
/etc/dhclient-script immediately after the
#!/bin/sh line at the beginning of the file.
# don't run DHCP on ae0
if [ $interface = "ae0" ]; then
exit 0
fi
After configuring DHCP, you must reboot your machine to make the changes take effect.
Return to the top.This section maybe will attempt to explain how to setup DHCP servers under NetBSD/mac68k. This document may get written for NetBSD-1.3. I've never done this so if anyone wants to add this section, feel free.
Return to the top.End of DHCP HOWTO