Connected: An Internet Encyclopedia
3.2 Client-server interaction - reusing a previously allocated network address

Up: Connected: An Internet Encyclopedia
Up: Requests For Comments
Up: RFC 2131
Up: 3. The Client-Server Protocol
Prev: 3.1 Client-server interaction - allocating a network address
Next: 3.3 Interpretation and representation of time values

3.2 Client-server interaction - reusing a previously allocated network address

3.2 Client-server interaction - reusing a previously allocated network address

If a client remembers and wishes to reuse a previously allocated network address, a client may choose to omit some of the steps described in the previous section. The timeline diagram in figure 4 shows the timing relationships in a typical client-server interaction for a client reusing a previously allocated network address.

  1. The client broadcasts a DHCPREQUEST message on its local subnet. The message includes the client's network address in the 'requested IP address' option. As the client has not received its network address, it MUST NOT fill in the 'ciaddr' field. BOOTP relay agents pass the message on to DHCP servers not on the same subnet. If the client used a 'client identifier' to obtain its address, the client MUST use the same 'client identifier' in the DHCPREQUEST message.

  2. Servers with knowledge of the client's configuration parameters respond with a DHCPACK message to the client. Servers SHOULD NOT check that the client's network address is already in use; the client may respond to ICMP Echo Request messages at this point.

                    Server          Client          Server
    
                      v               v               v
                      |                |               |
                      |              Begins            |
                      |          initialization        |
                      |                |               |
                      |                /|\             |
                      |   _________ __/ | \__________  |
                      | /DHCPREQU EST  |  DHCPREQUEST\ |
                      |/               |              \|
                      |                |               |
                   Locates             |            Locates
                configuration          |         configuration
                      |                |               |
                      |\               |              /|
                      | \              |  ___________/ |
                      |  \             | /  DHCPACK    |
                      |   \ _______    |/              |
                      |     DHCPACK\   |               |
                      |          Initialization        |
                      |             complete           |
                      |               \|               |
                      |                |               |
                      |           (Subsequent          |
                      |             DHCPACKS           |
                      |             ignored)           |
                      |                |               |
                      |                |               |
                      v                v               v
    
         Figure 4: Timeline diagram of messages exchanged between DHCP
                   client and servers when reusing a previously allocated
                   network address
    

    If the client's request is invalid (e.g., the client has moved to a new subnet), servers SHOULD respond with a DHCPNAK message to the client. Servers SHOULD NOT respond if their information is not guaranteed to be accurate. For example, a server that identifies a request for an expired binding that is owned by another server SHOULD NOT respond with a DHCPNAK unless the servers are using an explicit mechanism to maintain coherency among the servers.

    If 'giaddr' is 0x0 in the DHCPREQUEST message, the client is on the same subnet as the server. The server MUST broadcast the DHCPNAK message to the 0xffffffff broadcast address because the client may not have a correct network address or subnet mask, and the client may not be answering ARP requests. Otherwise, the server MUST send the DHCPNAK message to the IP address of the BOOTP relay agent, as recorded in 'giaddr'. The relay agent will, in turn, forward the message directly to the client's hardware address, so that the DHCPNAK can be delivered even if the client has moved to a new network.

  3. The client receives the DHCPACK message with configuration parameters. The client performs a final check on the parameters (as in section 3.1), and notes the duration of the lease specified in the DHCPACK message. The specific lease is implicitly identified by the 'client identifier' or 'chaddr' and the network address. At this point, the client is configured.

    If the client detects that the IP address in the DHCPACK message is already in use, the client MUST send a DHCPDECLINE message to the server and restarts the configuration process by requesting a new network address. This action corresponds to the client moving to the INIT state in the DHCP state diagram, which is described in section 4.4.

    If the client receives a DHCPNAK message, it cannot reuse its remembered network address. It must instead request a new address by restarting the configuration process, this time using the (non-abbreviated) procedure described in section 3.1. This action also corresponds to the client moving to the INIT state in the DHCP state diagram.

    The client times out and retransmits the DHCPREQUEST message if the client receives neither a DHCPACK nor a DHCPNAK message. The client retransmits the DHCPREQUEST according to the retransmission algorithm in section 4.1. The client should choose to retransmit the DHCPREQUEST enough times to give adequate probability of contacting the server without causing the client (and the user of that client) to wait overly long before giving up; e.g., a client retransmitting as described in section 4.1 might retransmit the DHCPREQUEST message four times, for a total delay of 60 seconds, before restarting the initialization procedure. If the client receives neither a DHCPACK or a DHCPNAK message after employing the retransmission algorithm, the client MAY choose to use the previously allocated network address and configuration parameters for the remainder of the unexpired lease. This corresponds to moving to BOUND state in the client state transition diagram shown in figure 5.

  4. The client may choose to relinquish its lease on a network address by sending a DHCPRELEASE message to the server. The client identifies the lease to be released with its 'client identifier', or 'chaddr' and network address in the DHCPRELEASE message.

    Note that in this case, where the client retains its network address locally, the client will not normally relinquish its lease during a graceful shutdown. Only in the case where the client explicitly needs to relinquish its lease, e.g., the client is about to be moved to a different subnet, will the client send a DHCPRELEASE message.


Next: 3.3 Interpretation and representation of time values

Connected: An Internet Encyclopedia
3.2 Client-server interaction - reusing a previously allocated network address