Share via


1.3 Overview

The Dynamic Host Configuration Protocol (DHCP) Server Management Protocol is a client/server protocol that is used to remotely configure, manage, and monitor the DHCP server. This protocol allows a client to view and update the server configuration settings as well as to create, modify, and delete DHCP client lease records. The protocol allows a client to access and modify DHCP server settings, enumerate and modify DHCP server configuration (DHCP scopes, reservations, exclusions, option definition, and option values), and monitor DHCP client lease records.

The DHCP Server Management Protocol (DHCPM) is a stateless protocol with no state shared across RPC method calls. Each RPC method call contains one complete request. Output from one method call can be used as an input to another call, but the protocol does not provide for locking of the DHCP server configuration or state data across method calls. For example, a client enumerates DHCP subnets with one call and then retrieves the properties of one or more DHCP subnets with another call. However, the protocol does not guarantee that the specified subnet has not been deleted by another client between the two method calls.

Relationship of DHCP Server Management Protocol to RPC

Figure 1: Relationship of DHCP Server Management Protocol to RPC

A typical application of this protocol involves the client querying or setting the configuration parameters of the DHCP server. The client also enumerates the list of subnets serviced by the DHCPv4 server and then enumerates the list of DHCPv4 clients with active IP address leases in a specified IPv4 subnet or IPv6 prefix. The client can modify the configuration of the DHCP server as required. The client can also add, delete, or modify DHCPv4 subnets or IPv6 prefix, or DHCP client lease records held in that DHCP subnet. A remote management client can do the following operations:

  1. Set, create, retrieve, or delete the configuration information for the DHCP server.

  2. Set, create, retrieve, or delete the subnet.

  3. Set, create, retrieve, or delete DHCP clients' lease records in a subnet.

  4. Retrieve counters kept by the DHCP server.

To perform any of the above operations usually involves sending a request to the DHCP server and specifying the type of operation (enumerate, get, and set) to perform along with any parameters associated with the requested operation. The DHCP server responds with the results of the operation. The following diagram shows an example of a remote client using the DHCPM to enumerate the DHCP option values configured for a specific vendor class and user class. The client sends a request to the DHCP server with an operation type of enumerate, as well as the vendor class and user class. The DHCP server responds with a return value of ERROR_SUCCESS or a Win32 error code. If the operation is successful, the DHCP server fills in the option values for the specified vendor class and user class in an array. The details of the various operations are defined in section 3.1.4, and the corresponding parameters are defined in section 2.2.

Note The DHCP Server Management Protocol consists of two interfaces. The interface dhcpsrv provides the basic management functionality originally supported and also includes the quarantine APIs, whereas the interface dhcpsrv2 supports enhanced functionality added in later server releases. For more information on what opnums are supported in each interface see Protocol Details section 3.

Client/server message exchange

Figure 2: Client/server message exchange