HP OpenVMS Systems Documentation

Content starts here HP TCP/IP Services for OpenVMS

HP TCP/IP Services for OpenVMS
Management


Previous Contents Index

8.7.3 Reinitializing the DHCP Server

Once you have made changes to the configuration files, you must force the server to read them again by sending it an HUP signal (see Section 8.3.1). Enter the following command:


$ DHCPSIGHUP

8.8 Supporting Utilities

The commands you use to modify and look at the contents of the DHCP databases are described in Table 8-10. TCP/IP Services supplies UNIX type commands for users familiar with the JOIN implementation of a DHCP server.

Table 8-10 DHCP Utility Commands Associated with Databases
DHCP GUI OpenVMS Command UNIX Command Description
Active IP Snapshot
Add/Delete
DHCPDBMOD jdbmod Modifies lease and naming information in the database. Allows you to preassign static IP addresses to clients. Also allows you to create, delete, or modify existing entries.
Preload MAC Addresses DHCPDBREG jdbreg Populates the database with MAC addresses of known clients. Each record to be loaded is terminated by a new line, and the fields within each record are separated by the vertical bar (|) character.
  DHCPDBDUMP jdbdump Reads and outputs information stored in the lease database files including MAC address information, IP addresses, and lease information. Each line of output describes the lease information for one client.
Active IP Snapshot DHCPSHOWDBS SHOWDBS Reads the same information described for DHCPDBDUMP , except that the output is in a format that is easier to read.
  DHCPDBSHOW DBSHOW Displays the contents of a single DHCP binary database.

For information about how to enter the DHCP utility commands, see Sections 8.8.1 through 8.8.3.

8.8.1 DHCPDBDUMP, DHCPSHOWDBS, and DHCPDBSHOW Utilities

The DHCPDBDUMP , DHCPSHOWDBS , and DHCPDBSHOW commands dump the information stored in the lease database files. The dumped lease information includes:

  • MAC address
  • MAC address type
  • MAC address length (octets)
  • IP address
  • Start of lease (UTC)
  • Lease expiration (UTC)
  • Time when lease can be extended (UTC)
  • Time when host last renewed or acquired this lease (UTC)
  • IP address of server owning the lease
  • Host name (without domain)
  • Domain name

Each line of output describes the lease information for one client. The output is in a format that is used by the DHCPDBMOD utility to modify the lease database.

Note

The DHCPBDUMP , DHCPSHOWDBS , and DHCPDBSHOW commands perform read operations on the database, while DHCPDBMOD performs write operations.

The DHCPDBDUMP , DHCPSHOWDBS , and DHCPDBSHOW commands accept a number of different flags and arguments. Table 8-11 lists some of the more important flags.

Table 8-11 DHCPDBDUMP, DHCPSHOWDBS, and DHCPDBSHOW Command Flags
Flag Description
-a Dumps dates in readable format.
-c Dumps currently active leases only.
-e Dumps expired leases only.

The following examples show typical output from the DHCPSHOWDBS , DHCPDBSHOW , and DHCPDBDUMP commands:


$ DHCPSHOWDBS
IP address       Owner            Expires            Granted on         Last mod
ified      client id
10.10.2.100      10.10.2.6        01/28/2000 13:50   01/28/2000 13:30   01/28/2000 13:30
   0 01:08:00:2b:e5:2c:44

10.10.2.101      10.10.2.6        01/28/2000 13:52   01/28/2000 13:32   01/28/2000 13:32
   0 01:08:00:2b:bf:7d:bb

10.10.4.100      10.10.2.5        01/21/2000 09:27   01/21/2000 09:07   01/21/2000 09:07
   0 01:08:00:2b:e5:2c:44

IP address       Name
10.10.2.101      gody.HP.com.
10.10.2.100      sarek12.HP.com.

$ DHCPDBSHOW a
IP address       owner            expires               granted on            la
st modified         network            client id
10.10.2.101      10.10.2.6        02/14/2000 11:18:10   02/14/2000 10:58:10   02
/14/2000 10:58:10   10.10.2.0          0,7,01:08:00:2b:e5:2c:44
10.10.2.103      10.10.2.6        02/14/2000 11:08:21   02/14/2000 10:48:21   02
/14/2000 10:48:21   10.10.2.0          1,6,08:00:2b:2a:de:1e
10.10.2.100      10.10.2.6        02/14/2000 11:14:23   02/14/2000 10:54:23   02
/14/2000 10:54:23   10.10.2.0          0,7,01:08:00:2b:bf:7d:bb
10.10.4.100      10.10.2.5        01/21/2000 09:27:26   01/21/2000 09:07:26   01
/21/2000 09:07:26   10.10.4.0          0,7,01:08:00:2b:e5:2c:44
10.10.2.104      10.10.2.6        02/14/2000 11:09:33   02/14/2000 10:49:33   02
/14/2000 10:49:33   10.10.2.0          1,6,08:00:2b:2a:de:a8

Record count = 5


$ DHCPDBDUMP
01:08:00:2b:e5:2c:44|0|7|10.10.2.100|949084208|949085408|949084808|949084208|
   10.10.2.6|sarek12|HP.com|

01:08:00:2b:bf:7d:bb|0|7|10.10.2.101|949084349|949085549|949084949|949084349|
   10.10.2.6|gody|HP.com|

01:08:00:2b:e5:2c:44|0|7|10.10.4.100|948463

8.8.2 DHCPDBMOD Utility

The DHCPDBMOD command modifies the lease and naming information in the database files. It allows the user to create, delete, or modify existing database entries and to preassign static IP address to clients.

The utility takes input from a file that describes various entries in the database. The syntax of each entry is similar to the output of DHCPDBDUMP .

Use the following format:

  • Terminate each record to be loaded by a new line.
  • Delimit the fields within each record with the vertical bar (|) character.
  • Express date fields in one of the following ways:
    • Coordinated Universal Time (UTC), the number of seconds since 00:00 01/01/1970 GMT
    • A format more easily understood, such as Mon Jan 09 1995 10:00 or 01/09/1995 10:00:00

Example 8-11 shows a sample entry. The first entry describes the client called alpha.acme.com with the IP address 143.32.3.20.

The second entry describes a Microsoft DHCP client with the IP address 143.32.3.21. No name is given for this client.

Example 8-11 Sample DHCPDBMOD Entry

$ DHCPDBMOD
00:a0:24:8c:6b:09(1)|1(2)|6(3)|143.32.3.20(4)|844989457(5)|844989466(6)|844989466(7)|844989466
(8)

    |143.32.3.1(9)|alpha(10)|acme.com(11)|

01:00:40:05:14:df:11|0|7|143.32.3.21|844989457|844989466|844989466|844989466

    |143.32.3.1|||

Although some fields can be empty, each entry consists of the following fields:

  1. MAC address
  2. MAC address type
  3. MAC address length (octets)
  4. IP address
  5. Start of lease (UTC)
  6. Lease expiration (UTC)---use -1 to indicate an infinite lease
  7. Time when lease can be extended (UTC)
  8. Time when host last renewed or acquired this lease (UTC)
  9. IP address of server owning the lease
  10. Host name (without domain)
  11. Domain name

The DHCPDBMOD command accepts a number of different flags and arguments. Table 8-12 shows some of the more important flags.

Table 8-12 DHCPDBMOD Command Flags
Flag Description
-d Deletes the record.
-e Stores the record even if the lease has expired.
-l Stores the lease information only. Does not store name information.
-n Stores the name information only. Does not store lease information.
-w Overwrites the record if a record already exists.

By default, DHCPDBMOD stores both lease and name information for nonexpired and new clients.

8.8.3 DHCPDBREG Utility

Use the DHCPDBREG command to populate the database with the MAC address of known MAC clients. Set the SERVER.PCY parameter Restrict to Known MAC Address to True to use this utility. The DHCPDBREG command can add or remove hosts from the list of known MAC addresses. Use the following syntax when you enter a record:

  • Terminate each record to be loaded by a new line.
  • Delimit the fields within each record with the vertical bar (|) character.

Each entry contains the following three fields:

  • MAC address
  • MAC address type
  • MAC address length (octets)

The DHCPDBREG command accepts a number of different flags. Two of the most important flags are as follows:

Flags Description
-d Deletes the record.
-s Displays all registered MAC addresses.

8.9 Solving DHCP Server Problems

If the DHCP log file contains the message: "network not administered by server" and you use class A, B, or C IP addressing, check the NETMASKS. file to see that you have entered the netmask correctly for the subnet.


Chapter 9
Configuring and Managing the DHCP Client

DHCP client is the TCP/IP Services component which allows a system to request network configuration information from a DHCP server and then use that information to configure one or more of its network interfaces.

TCP/IP Services DHCP client is an OpenVMS implementation of the Tru64 UNIX client.

This chapter reviews key concepts and describes the following topics:

9.1 Key Concepts

When a system connects to a network, in addition to the appropriate network software, it must have configuration information that identifies the system in network communications. As a minimum, it must have an IP address, a broadcast address, and a subnet mask configured before any communication with other systems can take place. This information can be statically configured, that is, permanently stored in a local database and used every time the network is initialized. Or it can be dynamically configured by obtaining the information from a DHCP server during network initialization. The DHCP server maintains the configuration information, and upon a client request for such information, returns the configuration for that particular host through a client and server dialog using the DHCP protocol.

A system can have more than one network interface installed and you can use DHCP client to dynamically configure all or a subset of the installed interfaces. There is one DHCP client process running on a system and it configures all interfaces that are designated as under DHCP control.

In an OpenVMS Cluster, you can use DHCP client to configure one of the systems, a mix of systems or all systems in the cluster. Each system in the cluster using DHCP to configure its interfaces, must run DHCP client.

Note

If a system is running DHCP client, it can not also run a DHCP server.

9.1.1 Designating the Primary Interface

Some of the parameters that are configurable by DHCP are interface specific. Examples of interface-specific parameters are the IP address and subnet mask. Most DHCP configurable parameters, however, are systemwide configurable parameters. Examples of systemwide parameters are the host name and DNS domain name.

The TCP/IP Services DHCP client supports controlled configuration of systemwide configurable items by designation of what is called the primary interface. The primary interface is the interface on which the DHCP client will use systemwide parameters received from the DHCP server to configure the system. Systemwide parameters received on an interface that is not designated primary will not be configured on your system by the DHCP client. There may be only one interface on a system that is designated as the primary DHCP interface, but you are not required to have any interface designated as the primary interface.

For example, if a system has multiple interfaces under DHCP control and the system receives a different host name from a DHCP server on each of the DHCP controlled interfaces, DHCP client uses the host name it receives on the primary interface to configure the host name for the client.

If a system has multiple interfaces and only one is under DHCP control, you can configure the systemwide parameters manually.

DHCP client uses the following rules to resolve conflicts:

  • The only-one-primary-interface rule
    This rule solves the potential conflict between two DHCP controlled interfaces on a host getting different systemwide parameter values. To resolve the conflict, you designate one interface to be the primary interface and the parameters values that you receive on that interface are the values DHCP client uses to configure the system. TCP/IP Services does not let you designate two primary interfaces.
  • The primary-interface-not-required rule
    This rule solves the problem of DHCP configuring an interface (or interfaces) with an IP address but also keeping manual control of the systemwide parameters. In this case, DHCP client does not designate the interface as the primary interface and ignores any systemwide parameters it receives from a DHCP server.

Systemwide parameters are configured for a system as the last part of processing the final message (a DHCPACK protocol message) from the DHCP server. DHCP client, first configures the interface's IP address, subnet mask, and broadcast address; then, if the interface is designated as the primary interface, DHCP client configures the systemwide parameters.

See Table 9-2 for a list of the DHCP configurable parameters supported by the TCP/IP Services DHCP client.

9.1.2 Requesting a Lease

A DHCP server allocates IP addresses to clients on a temporary or permanent basis. This time period is called a lease. A client can request a lease for some period of time, which the DHCP server can either honor or assign a different time period depending on the policy in force. A client may request a lease for an infinite period of time, but the server may choose to give out a lengthy but not infinite lease. For whatever time period the DHCP server assigns, the DHCP server guarantees not to reassign the IP address to any other system until the lease expires.

Lease times are represented in DHCP dialogs as relative time to be interpreted with respect to the client's clock. If there is drift between the client's clock and the server's clock, the server may consider the lease expired before the client does. To compensate, the server may return a shorter lease duration to the client than the server commits to its local database of client information.

9.1.3 Requesting Parameters

The first service provided by a DHCP server is to provide storage of network parameters for network clients. DHCP clients can query the DHCP server to retrieve the configuration parameters. In its initial discover or request message, a client can supply a list of parameters for which it needs information. If the server does not return any or all of the values for the requested parameters, the client uses default values for any missing values.

9.1.4 Understanding How the DHCP Client Operates

When your system has an interface configured under DHCP control, the following sequence of steps occur at TCP/IP Services startup time:

  1. The TCPIP$STARTUP procedure installs the DHCP client image, TCPIP$DHCP_CLIENT.EXE, with the appropriate OpenVMS system privileges.
  2. Then it issues the following command to start the interface:


    $ TCPIP START COMMUNICATION/INITIALIZE
    

    This command creates a subprocess and runs the DHCPCONF utility as follows to set up the interface:


    DHCPCONF -W 30 ifname START
    

    Alternatively, the command procedure issues the following command if the interface is the primary interface:


    DHCPCONF -P -W 30 ifname START
    

    The -w 30 option on the DHCPCONF command line tells DHCPCONF to wait for a maximum of 30 seconds before returning. This wait prevents the TCPIP$STARTUP procedure from hanging indefinitely when there are problems reaching a DHCP server. If the 30-second timer expires, the DHCP client process will, by default, continue to complete the DHCP dialog until it is successful or it is shut down.

  3. DHCPCONF creates the DHCP client process.
    If this is the first interface to be configured during the startup procedure, DHCPCONF creates a detached process and runs the TCPIP$DHCP_CLIENT_RUN.COM command procedure. TCPIP$DHCP_CLIENT_RUN invokes the DHCP client image, TCPIP$DHCP_CLIENT.EXE. TCPIP$DHCP_CLIENT continues to run until it is manually shutdown or the system is shutdown. Therefore, if more than one interface is to be configured, TCPIP$DHCP_CLIENT is ready to accept another DHCPCONF start command.
  4. DHCP client accepts the DHCPCONF start command.
    DHCP client reads the start command and begins the DHCP dialog with the server. DHCPCONF and the DHCP client use a simple UDP-based protocol to communicate. If a HOSTNAME. file exists, the suggested host name is sent to the server.
  5. The DHCP client/server DHCP dialog completes.
    DHCP client engages in a dialog with the DHCP server and when it completes the DHCP client sets the interface's IP address, subnet mask and broadcast address by sending the information via an ioctl to the TCP/IP kernel. If the interface is designated as the primary interface then any system-wide parameters received from the DHCP server are configured into the system.
  6. DHCP client saves all parameters received from the DHCP server in a file (interface.DHC). This step occurs even if the interface is not designated as the primary interface.
  7. DHCP client sends a task completion message to DHCPCONF to indicate that the interface is initialized and ready for work.
  8. The START COMMUNICATION/INITIALIZE command then repeats this process for the next interface configured to be under DHCP control.

9.2 DHCP Client Components

The section describes the software and system elements that comprise DHCP client including:

  • Executable files
  • Configuration files
  • Command files
  • System logical names
  • Log files

9.2.1 Executable Files

Three programs comprise the DHCP client component:

  • TCPIP$DHCP_CLIENT.EXE
    This is the executable file for the DHCP agent or daemon. This process engages in the DHCP protocol dialog with the DHCP server, receives the parameters from the server and then configures the parameters on the local system. The parameters include IP addresses and their lease information, among others.
    There is one DHCP client process per system, even for multihomed hosts. The DHCP client process is always running on a system that has an interface designated under DHCP control. The DHCP client uses the OpenVMS lock manager to prevent multiple DHCP client processes from executing concurrently on a system. The resource name used to control the number of client processes is TCPIP$DHCP_CLIENT_scsnode.
    You stop this process by invoking the TCPIP$DHCP_CLIENT_SHUTDOWN command procedure or by sending a DHCPSIGTERM to the process using the TCPIP$DHCP_SIGNAL utility. Do not use the DCL command STOP/IDENTIFICATION to stop this process.
    To ensure proper termination of the DHCP client process, HP recommends that you run the TCPIP$SHUTDOWN.COM procedure from your site-specific shutdown procedure.
    When a DHCP client process is not already executing, and you or the system issues a DHCPCONF command, the system will automatically run the DHCP client process. The TCP/IP command SET INTERFACE/DHCP and the TCP/IP command START COMMUNICATION/INITIALIZE both invoke DHCPCONF to start the DHCP client. Running TCPIP$DHCP_CLIENT_STARTUP.COM will not itself create a DHCP client process.
  • TCPIP$DHCP_CLIENT_CONF.EXE
    This is the executable file for the DHCPCONF command, which is the UNIX interface to the DHCP client. It communicates with the DHCP client process to start the client, release a lease, drop the interface from control and other requests.
    Most users do not need to execute a DHCPCONF command directly. The TCP/IP command SET INTERFACE/DHCP issues the necessary DHCPCONF commands.
  • TCPIP$DHCP_CLIENT_SHOWDHC.EXE
    This is the executable file for the SHOWDHC command. This command displays the data stored in an interface's parameter file ( interface.DHC ). Refer to Section 9.6 for a description of the commands supported by this program.


Previous Next Contents Index