HPlogo Installing and Administering Internet Services: HP 9000 Networking > Chapter 6 Dynamic Host Configuration Protocol (DHCP)

Configuration Overview

» 

Technical documentation

Complete book in PDF

 » Table of Contents

 » Index

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)

  • To individual devices

  • 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.

Pool 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:

DHCP_POOL_GROUP:\
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.

Figure 6-3 Devices Can be Configured as Part of a DHCP Group

Devices Can be Configured as Part of a DHCP 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 ”.

DHCP Device Group

You can create a device group by configuring similar client devices and specifying a unique IP address range for the group of client devices. The device group differs from the pool group in that all the clients in the group must be the same. For example they must all be printers or X terminals. These clients must all match the device type specified in the class-id field in the /etc/dhcptab file. In the example below, all the clients in this device group must be xterminals.

DHCP_DEVICE_GROUP:\
class-name=XTERM_GROUP:\
class-id="Xterminal:"\
subnet-mask=255.255.255.0:\
addr-pool-start-address= 15.13.100.50\
addr-pool-last-address= 15.13.100.59:
NOTE: It is not very common for the class_id field to be defined. So most clients are 'anonymous' and will be grouped as a pool group.

For specific details on configuring DHCP to distribute IP addresses to groups of devices, see “Configuring a DHCP Server to Distribute IP Addresses to Groups of Devices”

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.

DHCP_POOL_GROUP:\
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.

Figure 6-4 DHCP Devices Can Have Fixed IP Addresses

DHCP Devices Can Have Fixed IP Addresses

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” .

DHCP Configuration through BOOTP Relay Agent

The third method DHCP distributes IP addresses to clients is through a BOOTP Relay Agent. A BOOTP Relay Agent is a machine on the local network that forwards boot requests from a DHCP or BOOTP client to a configured DHCP or BOOTP server.

Figure 6-5 Relay Agent Scenario

Relay Agent Scenario

In Figure 6-5 “Relay Agent Scenario”, suppose that Client2 broadcasts a boot request. The server containing the booting information belongs to a remote network. Therefore, the broadcast message is received by the local machine known as the relay agent. The relay agent sends the message across the gateway to the remote server, which in turns sends the boot information for Client2 back to the relay agent. The relay agent then broadcasts a message which is received by Client2. The message contains booting information for Client2.

As for the gateway, the gateway could be configured to also serve as a relay agent if the gateway is "DHCP-smart." However, if the gateway does not have knowledge of DHCP, then a dedicated relay agent must be used.

Client1 in the drawing does not need to use a relay agent because Client1 is on the same network as the server.

NOTE: Most modern routers are DHCP-smart. The relay capability is built into the router, so you will not need the machine dedicated as a relay agent.

For specific details on configuring DHCP to distribute IP addresses through the BOOTP Relay Agent, see “Configuring a DHCP Server to Distribute IP Addresses through a BOOTP Relay Agent”.

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 

© 2000 Hewlett-Packard Development Company, L.P.