You should configure and administer the DHCP server using
SAM. You can also edit the configuration files /etc/bootptab and /etc/dhcptab manually, but it is not recommended. This section
covers steps you must take to configure DHCP using SAM.
Using SAM, you can configure DHCP to
assign and distribute IP addresses in three different ways:
By Device or Pool groups (you define
which devices are in these groups)
Through a BOOTP Relay Agent
DHCP Device and Pool Group Configuration |
 |
DHCP allows you to configure groups of similar client devices on a single subnet.
Each device in a specific group is automatically assigned an available
IP address from its group upon requesting booting information.
By creating various groups of devices you can compose each
group with a device type specific to that group. For example, you
may want one group to contain only printers. You may want another
group to contain a certain type of terminal.
The /etc/dhcptab file contains groups of IP addresses that are managed by
DHCP, divided into two types: Pool Groups and Device Groups.
A pool group is a collection of IP addresses on one subnet,
available for anonymous clients (most clients are anonymous). The
pool groups are the most common type of IP address groups. Here
is an example pool group entry in /etc/dhcptab file:
ba:\ pool-name=my_first_pool:\ subnet-mask=255.255.255.0:\ addr-pool-start-address= 15.13.100.20\ addr-pool-last-address= 15.13.100.29:
|
In the example above, ba indicates the broadcast flag has been turned on. Most
clients need this flag, so it will be in most pool group entries.
The pool-name is a label that helps the system administrator
identify the pool group. The client is not aware of this name. The
beginning and end of the address range in the pool is defined by addr-pool-start-address and addr-pool-last-address. The pool group in this example contains 10 addresses
on the 15.13.100 subnet: 15.13.100.20 through 15.13.100.29.
There can only be one pool group per subnet. The pool group
is the default IP address group.
In Figure 6-3 “Devices Can be Configured as Part
of a DHCP Group”, assume that a particular group
has been configured so that Client1, Client2, and Client3 all belong
to this group. This means that each device in this group will have
the same group name and will be given an IP address that is within
the group's IP address range. The IP addresses within the
group's range make up what is known as a pool of addresses.
When Client1, Client2, or Client3 perform a boot request, they will
automatically be assigned an IP address not already in use from
this pool.
DHCP allows you to exclude certain addresses within a group
if you do not want them used.
You can also define many values for the devices of a group
including address lease times, DNS servers, NIS servers, and many
other optional parameters. See the example “Complex DHCP Pool and Device Group
Files ”.
Complex DHCP Pool and Device Group
Files
You can define many more fields for both pool groups and device
groups in the file. Here is an example of a POOL_GROUP file with
many more fields defined.
class-name=MEGA_OPTION_GROUP:\ addr-pool-start-address= 192.11.22.11:\ addr-pool-last-address= 192.11.22.15:\ subnet-mask=255.255.255.0:\ lease-time=1000:\ lease-policy=accept-new-clients:\ allow-bootp-clients=false:\ call-on-assignment=/etc/script.assignment:\ call-on-decline=/tmp/script.decline:\ call-on-release=/tmp/script.release:\ call-on-lease-extend=/tmp/script.lease_extend:\ bf=goofy.bootfile:\ hd=/var/tmp:\ ba:\ cs=192.11.22.36:\ ds=192.99.99.99 15.13.104.13:\ gw=192.44.44.44:\ im=77.77.33.33:\ lg=123.123.123.123 55.55.55.55:\ lp=45.45.45.45:\ ns=66.66.66.66:\ rl=123.77.99.35:\ to=153:\ ts=88.99.88.99:\ vm=rfc1048:\ hn:\ bs=auto:\ md=/tmp/dumpfile.of.the.century:\ dn=cup.hp.com:\ ef=/tmp/extensions:\ nt=194.88.200.244:\ rp=/turnip/onion/carrot:\ ss=200.233.200.233:\ tr=50:\ tv=87:\ xd=77.11.1.244:\ xf=77.11.1.245:\ yd=hp.com:\ ys=9.7.5.3:
|
For more information about the other flags in this example,
see the bootpd(1m) man page.
DHCP Individual Device Configuration |
 |
In addition to having addresses assigned by groups, DHCP allows
IP addresses to be individually configured for devices. For administrative
or security reasons, you may want certain devices to have fixed
addresses.
Using SAM, you must configure each individual device with
the fixed-address device option. Provide information about the device, including
its own IP address.
 |
 |  |
 |
 | NOTE: Devices that have fixed IP addresses in bootptab have
priority over pool groups. The devices with fixed IP addresses are
found first. |
 |
 |  |
 |
In Figure 6-4 “DHCP Devices Can Have Fixed IP Addresses”, assume that you have configured
a DHCP group (group A) to include Client1 and Client2, meaning that
each will receive an IP address from a pool of available addresses
at boot request. However, you configured Client3 and Client4 to
have fixed IP addresses. Client3 and Client4, therefore, will be
assigned the addresses you configured for them upon boot request.
Client3 and Client4 will always be assigned these same addresses
unless you change the configuration.
DHCP also allows you to define many optional parameter values
for clients with fixed addresses. Fixed address devices are configured
in /etc/bootptab file. Again, it is best to use SAM to configure the /etc/bootptab file.
For specific details on configuring DHCP to distribute IP
addresses to individual devices, see “Configuring a DHCP Server to Distribute
IP Addresses to Individual Devices” .
Configuring PING Timeouts |
 |
The DHCP server optionally sends a PING (ICMP echo) request
to see if the IP address it wants to assign to a client is in use
or not. If the server does not receive the reply in a specified
time, the server assumes the IP address is NOT in
use. It then assigns that IP address to the client. The specified
time is the timeout value in milliseconds. The timeout value can
be set using the new option, "-p".
The timeout value can be between 1 and 3000 milliseconds.
By default, the timeout value is 3000 milliseconds.
The value can be specified in the /etc/inetd.conf file:
# bootps dgram udp wait root /usr/lbin/bootpd -p500
|