[Previous] [Next] [Contents] [Glossary]

Dynamic Host Configuration Protocol

Client/Server Model

The client and the server negotiate in a series of messages in order for the client to get the parameters it needs.

The following diagram shows the messages exchanged between the DHCP client and servers when allocating a new network address. Next is a detailed explanation of all the various messages and a description of the communication steps.

This process can involve more than one server but only one server is selected by the client. In the figure, the selected server is marked 'selected' and the other, 'not selected' server stands for all the possible not selected servers.

[Client/server interaction timeline. Fully described below.]

Description of the communication steps

  1. The client broadcasts a DHCPDISCOVER.

  2. Each server may respond with a DHCPOFFER message.

  3. The client receives one or more DHCPOFFER messages from one or more servers and chooses one server from which to request configuration parameters.

    The client broadcasts a DHCPREQUEST message.

  4. Those servers not selected by the DHCPREQUEST message use the message as notification that the client has declined that server's offer.

    The server selected in the DHCPREQUEST message commits the responds with a DHCPACK message containing the configuration parameters for the requesting client.

  5. The client receives the DHCPACK message with configuration parameters. At this point, the client is configured.

    If the client receives a DHCPNAK message, the client restarts the configuration process.

  6. The client may choose to relinquish its lease on a network address by sending a DHCPRELEASE message to the server (e.g. on shutdown).

  7. The server receives the DHCPRELEASE message and marks the lease as free.

Variations on the timeline diagram

There are two main variations on the presented client/server interaction scenario:
  1. Reuse of a previously allocated network address:
    If a client remembers (in its cache) and wishes to reuse a previously allocated network address, a client may choose to omit some of the steps taken in case of a new allocation.
    In the first DHCPREQUEST the client includes it's network address in the 'requested IP address' option. The server that has the knowledge of the client's configuration respond with a DHCPACK message and from then on the diagram continues from step (5).

  2. Obtaining parameters with externally configured network address:
    If a client has obtained a network address through some other means (e.g., manual configuration), it may use a DHCPINFORM request message to obtain other local configuration parameters. Servers receiving a DHCPINFORM message construct a DHCPACK message with any local configuration parameters appropriate for the client without allocating a new address.


[Previous] [Next] [Contents] [Glossary]

About the authors