What happens when a DHCP client is unable to lease or renew lease of IP address at the end of the lease duration?




DHCP Lease "Life Cycle" Overview (Allocation, Reallocation, Renewal, Rebinding and Release) and Lease Timers
(Page 1 of 2)

The use of dynamic address allocation in DHCP means a whole new way of thinking about addresses. A client no longer owns an address, but rather leases it. This means that when a client machine is set to use DHCP dynamic addressing, it can never assume that it has an address on a permanent basis. Each time it powers up, it must engage in communications with a DHCP server to begin or confirm the lease of an address. It also must perform other activities over time to manage this lease and possibly terminate it.

The DHCP Lease "Life Cycle"

Calling dynamic address assignments leases is a good analogy, because a DHCP IP address lease is similar to a “real world” lease in a number of respects. For example, when you rent an apartment, you sign the lease. Then you use the apartment for a period of time. Typically, assuming you are happy with the place, you will renew the lease before it expires, so you can keep using it. If by the time you get near the end of the lease the owner of the apartment has not allowed you to renew it, you will probably lease a different apartment to ensure you have somewhere to live. And if you decide, say, to move out of the country, you may terminate the lease and not get another at all.

DHCP leases follow a similar lease “life cycle”, which generally consists of the following phases:

  • Allocation: A client begins with no active lease, and hence, no DHCP-assigned address. It acquires a lease through a process of allocation.
  • Reallocation: If a client already has an address from an existing lease, then when it reboots or starts up after being shut down, it will contact the DHCP server that granted it the lease to confirm the lease and acquire operating parameters. This is sometimes called reallocation; it is similar to the full allocation process but shorter.
  • Normal Operation: Once a lease is active, the client functions normally, using its assigned IP address and other parameters during the “main part” of the lease. The client is said to be bound to the lease and the address.
  • Renewal: After a certain portion of the lease time has expired, the client will attempt to contact the server that initially granted the lease, to renew the lease so it can keep using its IP address.
  • Rebinding: If renewal with the original leasing server fails (because, for example, the server has been taken offline), then the client will try to rebind to any active DHCP server, trying to extend its current lease with any server that will allow it to do so.
  • Release: The client may decide at any time that it no longer wishes to use the IP address it was assigned, and may terminate the lease, releasing the IP address. Like the apartment-renter moving out of the country, this may be done if a device is moving to a different network, for example. Of course, unlike DHCP servers, landlords usually don't let you cancel a lease at your leisure, but hey, no analogy is perfect.

Figure 259 illustrates the DHCP life cycle using an example that spans three leases.


Figure 259: DHCP “Life Cycle” Example

In this example, the initial lease has a duration of eight days and begins at Day 0. The T1 and T2 timers are set for 4 days and 7 days respectively. When the T1 timer expires the client enters the renewal period, and successfully renews at Day 5 with a new 8-day lease. When this second lease’s T1 timer expires, the client is unable to renew with the original server. It enters the rebinding period when its T2 timer goes off, and is granted a renewed 8-day lease with a different server. Three days into this lease it is moved to a different network and no longer needs its leased address, so it voluntarily releases it.

What happens when a DHCP client is unable to lease or renew lease of IP address at the end of the lease duration?



If you find The TCP/IP Guide useful, please consider making a small Paypal donation to help the site, using one of the buttons below. You can also donate a custom amount using the far right button (not less than $1 please, or PayPal gets most/all of your money!) In lieu of a larger donation, you may wish to consider purchasing a download license of The TCP/IP Guide. Thanks for your support!


Home - Table Of Contents - Contact Us

The TCP/IP Guide (http://www.TCPIPGuide.com)


Version 3.0 - Version Date: September 20, 2005

© Copyright 2001-2005 Charles M. Kozierok. All Rights Reserved.


Not responsible for any loss resulting from the use of this site.

Huawei uses machine translation combined with human proofreading to translate this document to different languages in order to help you better understand the content of this document. Note: Even the most advanced machine translation cannot match the quality of professional translators. Huawei shall not bear any responsibility for translation accuracy and it is recommended that you refer to the English document (a link for which has been provided).

IP addresses that are dynamically allocated by a DHCP server have leases. A DHCP Discover message from a DHCP client can carry an expected lease. When allocating network parameters, the DHCP server compares the expected lease with the specified lease in the address pool and allocates an IP address with a smaller lease to the DHCP client. When the lease expires or the client goes offline, the DHCP server reclaims the IP address, which can then be allocated to other clients. This mechanism improves IP address utilization. To continue to use this IP address, the DHCP client must renew its IP address lease.

Figure 3-5 shows how a DHCP client renews its IP address lease.

Figure 3-5  Renewing an IP address lease

  1. When the lease reaches 50% (T1) of its validity period, the DHCP client sends a unicast DHCP Request message to the DHCP server to request lease renewal. If the DHCP client receives a DHCP ACK message, the IP address lease is successfully renewed (counted from 0). If the DHCP client receives a DHCP NAK message, the DHCP client must send a DHCP Discover message to apply for a new IP address.
  2. If no response is received from the DHCP server when the lease reaches 87.5% (T2) of its validity period, the DHCP client sends a broadcast DHCP Request message to request lease renewal. If the DHCP client receives a DHCP ACK message, the IP address lease is successfully renewed (counted from 0). If the DHCP client receives a DHCP NAK message, the DHCP client must send a DHCP Discover message to apply for a new IP address.
  3. If no response is received when the lease expires, the DHCP client stops using the IP address and sends a DHCP Discover message to apply for a new IP address.

If a DHCP client does not need to use the allocated IP address before the lease expires, the DHCP client sends a DHCP Release message to the DHCP server to request IP address release. The DHCP server saves the configuration of this DHCP client and records the IP address in the allocated IP address list. The IP address can then be allocated to this DHCP client or other clients.

A DHCP client can send a DHCP Inform message to the DHCP server to request configuration update.

Figure 3-6 shows how a DHCP client renews its IP address lease when a DHCP relay agent is deployed.

Figure 3-6  Renewing the IP address lease when a DHCP relay agent is deployed

  1. When the lease reaches 50% (T1) of its validity period, the DHCP client sends a unicast DHCP Request message to the DHCP server to request lease renewal. If the DHCP client receives a DHCP ACK message, the IP address lease is successfully renewed (counted from 0). If the DHCP client receives a DHCP NAK message, the DHCP client must send a DHCP Discover message to apply for a new IP address.
  2. If no response is received from the DHCP server when the lease reaches 87.5% (T2) of its validity period, the DHCP client sends a broadcast DHCP Request message to request lease renewal. The DHCP relay agent then sends a unicast DHCP Request message to the DHCP server. For details about how the DHCP relay agent processes received messages, see How a DHCP Server Allocates Network Parameters to New DHCP Clients. If the DHCP client receives a DHCP ACK message, the IP address lease is successfully renewed (counted from 0). If the DHCP client receives a DHCP NAK message, the DHCP client must send a DHCP Discover message to apply for a new IP address.
  3. If no response is received when the lease expires, the DHCP client stops using the IP address and sends a DHCP Discover message to apply for a new IP address.

This Document Applies to these Products