|
|
Installing and Administering Internet Services: HP 9000 Networking > Chapter 6 Dynamic Host Configuration Protocol (DHCP)Configuration Overview |
|
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:
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:
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 ”. 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.
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” 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.
For more information about the other flags in this example, see the bootpd(1m) man page. 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.
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” . 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. 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.
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”. 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:
|
|