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

Configuring DHCP

» 

Technical documentation

Complete book in PDF

 » Table of Contents

 » Index

This section contains information needed to configure DHCP servers to distribute IP addresses to client groups, individual clients, and all clients via a BOOTP Relay Agent.

Before configuring the DHCP server, you must set up the broadcast address and set aside a block of addresses for DHCP server to distribute.

Setting Up the Broadcast Address

Before starting the server, you must set the broadcast address for the lan0 interface name if ifconfig requests it. You can do this either manually or through SAM.

Changing the Address Manually

  1. Issue the command ifconfig lan0 broadcast 255.255.255.255.

  2. Issue the command /etc/rc.config.d/netconf.

  3. Edit the BROADCAST_ADDRESS variable for lan0 to 255.255.255.255.

Changing the Address Using SAM

  1. Start SAM. You must be root user to access SAM.

  2. Double-click the Networking and Communications icon.

  3. Double-click the Network Interface Cards icon.

  4. Go to Advanced Options and set the broadcast address to 255.255.255.255.

  5. Click OK and exit SAM.

If there is more than one LAN interface, each must have a broadcast address of 255.255.255.255.

Preparing to Configure a DHCP Server

Only one DHCP server is allowed per network.

  1. Set aside a set of IP addresses that is currently unused (preferably a contiguous block of addresses).

    For example: 15.1.48.50 - 15.1.48.80

    The DHCP server will assign IP addresses to clients from this set of IP addresses.

  2. Pre-assign and register hostnames to the IP address allocated above. Using the -h option to the dhcptools(1M) command may be useful.

    For example:

    dhcptools -h fip=15.1.48.50 no=30 sm=255.255.255.0 hn=devlab##
    This command will create a file in /tmp/dhcphosts that can be incorporated into your /etc/hosts or DNS/NIS database.

  3. Designate a system that is always available to its clients.

Configuring a DHCP Server to Distribute IP Addresses to Groups of Devices

  1. Start SAM.

  2. Double-click the Networking and Communication icon.

  3. Double-click the Bootable Devices icon.

  4. Double-click the "DHCP Device Groups Booting from this Server" icon.

  5. Add the new group of IP addresses that you allocated in the “Preparing to Configure a DHCP Server”.

  6. Click the Action menu item, then choose Add DHCP Group.

  7. Complete the following fields on the screen:

    Group Name:

    This can be any name that is not already defined as a DHCP group.

    Subnet Address:

    This is the portion of an IP address that is not masked off by the subnet mask. You can enter the IP address in the range you selected along with the correct subnet mask and SAM will calculate the portion that is not masked off for you.

    Subnet Mask:

    The subnet mask depends on the "class" of your network. It determines how an IP address is separated into a network number and a host specific number. An example of a subnet mask is 255.255.255.0.

    Subnet Address
    Pool:

    Click this button to select the range of IP addresses that you allocated in the section, “Preparing to Configure a DHCP Server”. A new screen will be displayed where you can enter the START and END address. If there are addresses within the range that you picked that you do not want allocated via DHCP, you can use the Reserved Addresses button to specify those.

    Allow Any
    Device Class:

    The SAM default is to allow any type of DHCP device to use the group of IP address you are configuring. This may be undesirable if you use a different method (or a different DHCP server or group) for managing systems such as PCs running Win95™ or NT™. If you want this range of addresses to be used only by HP-UX systems, then unselect this button, and enter the text: "HewlettPackard.HP-UX" in the text field provided.

    Automatic
    Allocation to
    Bootp Clients:

    Leave this option disabled. Enabling it will cause problems for bootp devices, such as printers and terminals, that rely only on their pre-configured server to respond to boot request.

    Accept New
    Clients:

    Leave this option enabled. It allows new clients to be added to the DHCP group.

    Address Lease
    Time:

    The lease time should be set sufficiently long so that if a client system is temporarily out of service for a time, its lease will not expire too soon. Infinite leases will never expire and disable the IP address reclamation feature of DHCP.

    Boot file name:

    Leave this field blank.

  8. After filling in the parameter fields on the Add DHCP Group screen, click OK. SAM will make the modifications to the /etc/dhcptab file.

  9. Go to the Action Menu and enable the Boot Server, if it is not already enabled.

Configuring a DHCP Server to Distribute IP Addresses to Individual Devices

  1. Start SAM.

  2. Double-click the Networking and Communication icon.

  3. Double-click the Bootable Devices icon.

  4. Double-click the "Fixed-Address Devices Booting from this Server" icon.

  5. Click the Action menu item, then choose Add Fixed-Address Device to add the individual device.

  6. Complete the following fields on the screen:

    Host Name:

    This is the name of the device.

    Internet
    Address:

    This is the IP address.

    Subnet
    Address:

    This is the portion of an IP address that is not masked off by the subnet mask. You can enter the IP address in the range you selected along with the correct subnet mask and SAM will calculate the portion that is not masked off for you.

    Host ID
    Method:

    This is either the station address or the client ID.

    Station address:

    This shows the 12-digit hexadecimal address.

    Boot Device
    Adapter Type:

    This is the type of interface card that connects the client to the server. It's either Ethernet or Token Ring.

    Template Host
    Button:

    You can either configure device-specific information by individually configuring a device or by selecting from a list of configured templates. Use the template host button to view the list of configured templates.

    Boot File
    Name:

    This file contains all necessary booting information for the client. You can specify the path name of the boot file relative to tftp's home directory.

  7. After filling in the parameter fields listed in step 6, click OK. SAM will make the modifications to the /etc/bootptab file.

  8. Go to the Action Menu and click "Enable the Boot Server," if it is not already enabled.

Configuring a DHCP Server to Distribute IP Addresses through a BOOTP Relay Agent

  1. Start SAM.

  2. Double-click the Networking and Communication icon.

  3. Double-click the Bootable Devices icon.

  4. Double-click the "Devices for which Boot Requests are Relayed to Remote Servers" icon.

  5. Click the Action menu item, then choose "Add Device to Relay Boot Requests from...".

  6. Complete the following fields on the screen:

    Host Name:

    The name of the device or group.

    Forwarding
    Requests from:

    Select one of the four options:

    • All Devices: This means request from all devices on the network will be forwarded to the server or servers you specify later in this form.

    • All HP Devices: This means requests from all HP devices on the network will be forwarded to the server or servers you specify.

    • Other Group of Devices: This means some of devices will forward requests to the server you specify. You can create a group for these devices by using the station address and station address mask fields.

    • Single Device: This means request will be sent from a single device. You can enter the station address. The station address mask will default to all Fs.

    Station Address:

    This is the 12-digit hexadecimal address of a client or group of clients requests will be sent to.

    Station Address
    Mask:

    This is the hexadecimal value used to filter client boot requests according to their station address.

    Bootp/DHCP
    Server:

    This is the host name or IP address of a remote boot server that can provide boot information for the client or client group. You can enter multiple servers to receive boot requests.

    Forward Boot
    Requests to:

    Select from this list the address of the Bootp or DHCP server that requests will be sent to.

    Boot Device
    Adapter Type:

    This is the type of interface card that connects the client to the server. It's either Ethernet or Token Ring.

    Wait before
    Relaying:

    Enter the number of seconds a relay agent should wait before relaying boot requests to other servers. This delay allows servers on the local subnet to answer boot requests first.

    Max # of Relay
    Hops:

    Shows the maximum number of times a boot request from the client or client group can be forwarded until it reaches the server that contains the boot information. The default is 4 hops, and the maximum is 16.

  7. After filling in the parameter fields in step 6, click OK. SAM will make the modifications to the /etc/bootptab file.

  8. Go to the Action Menu and click "Enable the Boot Server," if it is not already enabled.

Enabling DHCP on a System Not Initially Configured with DHCP

  1. As root, start SAM.

  2. Double-click Networking and Communications.

  3. Double-click Network Interface Cards.

  4. Highlight the card you wish to enable DHCP on.

  5. Go to the Actions menu and select Configure.

  6. Click once on the Enable DHCP button.

  7. Click OK and exit SAM.

Your system will start using DHCP after the next reboot.

bootptab and dhcptab Files

Two configuration files, bootptab and dhcptab, are used for your DHCP configuration. These files contain DHCPtab pool and device group information, as well as the start and end addresses or bootptab has fixed address devices.

Configuration changes made using SAM are written to these files. You can also manually edit these files if desired, although most of your work will probably be performed using SAM. However, it is recommended that you use SAM to configure DHCP.

The bootptab file contains configuration information for old BOOTP clients as well as DHCP clients with fixed IP addresses. The bootptab file also contains configuration for relay agents.

The dhcptab file contains configuration information for DHCP pool or device groups, where clients are assigned IP addresses from a pool of currently unused addresses.

For details on how to edit the configuration files manually, see the dhcptools manpages.

Converting BOOTP Clients to DHCP Clients

Because DHCP makes allocating IP addresses easier, you may want to convert old BOOTP clients to DHCP clients. You can do this by using the allow-bootp-clients option of the bootpd(1M) command. You can refer to this man page for detailed information. You can make an old BOOTP client part of a DHCP group that has been defined. bootpd is the internet boot protocol server daemon that implements DHCP, BOOTP, and DHCP/BOOTP relay agents.

DHCP is backwards compatible with BOOTP, so no changes are required of existing users of BOOTP.

Configuring DHCP to be Used with OL*

To use DHCP with OL*, you will need to kill the bootp daemon after you complete the replacement for OL*.

NOTE: The bootp daemon should be killed manually and later started manually after the OL* operations.

Configuring DHCP to Deny Address Allocation to Specific Clients

You can configure the HP-UX DHCP server to refuse to allocate IP addresses to certain clients. In the /etc/dhcpdeny configuration file, list the hardware addresses of the clients you want to deny IP address allocation.

Below is an example of how the hardware addresses should be listed in the /etc/dhcpdeny file:

0x000aabbbcccd
0x0060B02088B4
6a123400ffe
d

By default, DHCP assumes all the addresses as hexadecimal addresses. Addresses that do not have "0x" as the prefix will be treated as hexadecimal addresses.

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