Thu, 06 Apr 2006

Windows Client and Long DHCP Leases

I've been meaning to note this for a while but never got around to it so here goes.

A few weeks back I updated the DHCP server used in my employer's internet gateway appliance. With the previous version of the server we issued leases with infinite lease times but the new version no longer supports infinite leases. To work around this I configured the server to issue very long leases, over 3-4 years if I recall correctly.

This caused some rather unexpected behaviour with Windows XP clients.

Instead of using the long lease as expected, the Windows client would re-request a new lease within seconds or minutes of receiving one. This looks like a signedness or overflow issue when handling the lease time value. Several different Linux DHCP clients worked correctly.

Googling around didn't find anyone else with this problem. I'm guessing this doesn't come up much because people rarely use such long leases. Also the Windows DHCP server doesn't allow you to specify such long lease times. I'm betting the Windows DHCP client implementation was mainly tested against the Windows DHCP server.

Rather than wasting more time on this (a lot of time has been wasted on debugging this) my workaround was to simply set the lease time to 2 years and be done with it. That's long enough to suit our needs and seems to not confuse Windows.

Fingers crossed that this keeps on working as time goes on... Wouldn't it be nice if everything just worked like it was supposed to?

posted at: 12:15 | permalink | comments