3

Scenario: I use DHCP server to authenticate and provide specific services to my device.

  1. Everything is working well, my client device has a valid IP address 192.168.0.2 and a QoS service assigned by the DHCP server.
  2. My DHCP server breaks down, device still holds on to the IP address 192.168.0.2 because of the available lease time and is able to communicate with other devices in the network.

I would like to know what exactly happens when the DHCP server comes online again. Will the DHCP server know about the DHCP state held by my client device along with the granted QoS service? Or will the device have to be authenticated again in order to avail the QoS service?

Any help or information on the above would be highly appreciated.

2

Normally the DHCP server would have saved its lease data to persistent storage, so after coming up again it would indeed know about the state of your client device. If however the breakdown was such that the lease data was lost then this would not hold and the server would come up knowing nothing.

If the DHCP server does just assign the QoS service together with the lease and be done with it then the device can continue using the QoS service until the lease expires even though the DHCP server may have forgotten about it. When the client device renews the lease it will also be assigned the QoS service again and all is well. If however the DHCP server plays an ongoing role in providing the QoS service even between lease renewals then the device may actually lose the QoS service until it renews the lease. This depends on the details of how that QoS service is implemented.

1

I would like to know what exactly happens when the DHCP server comes online again. Will the DHCP server know about the DHCP state held by my client device along with the granted QoS service? Or will the device have to be authenticated again in order to avail the QoS service?

All of this very much depends on what happened to the DHCP server, how 'resilient' it is, and how it was recovered back into service.

Most DHCP servers will record state to disk so they can at least attempt to pick up where they left off. Obviously if that isn't possible, if it's lost all its settings and lease info then all bets are off.

In either case, the client doesn't "authenticate". It instead will continue to use the IP address until one of its "renewal times" arrives then it will attempt to contact the DHCP server that issued its current lease, then if it cannot do that it will attempt to get a new IP address by broadcasting a general DHCP request:

A DHCP client automatically attempts to renew its lease as soon as 50 percent of the lease duration has expired. The DHCP client will also attempt to renew its IP address lease each time that the computer restarts. To attempt a lease renewal, the DHCP client sends a DHCPREQUEST packet directly to the DHCP server from which the client obtained the lease.

If the DHCP server is available, it renews the lease and sends the client a DHCPACK packet with the new lease duration and any updated configuration parameters. The client updates its configuration when it receives the acknowledgment. If the DHCP server is unavailable, the client continues to use its current configuration parameters.

If the DHCP client fails to renew its lease the first time, then the DHCP client broadcasts a DHCPDISCOVER packet to update its address lease when 87.5 percent of the current lease duration expires. At this stage, the DHCP client accepts a lease that any DHCP server has issued.

-- https://www.serverbrain.org/network-services-2003/how-the-dhcp-lease-renewal-process-works-1.html

0

DHCP Servers often store leases on the file system, meaning if the server crashes and the lease file isn't corrupted, then when the DHCP server comes back online it will be aware of addresses still on lease.

A DHCP server doesn't enforce anything - a device can choose to use its own address and configuration against what the DHCP server has said. DHCP only simplifies configuration by giving the client recommended parameters and supply an IP address which is known to not be in use by another device.

The worst case scenario would be that the lease file corrupts and the DHCP server leases a different device an IP address which was already on lease by another device, causing two devices to use the same address.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.