Author Topic: DHCP 2038 problem  (Read 2382 times)

Jacob

  • Zen Apprentice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
DHCP 2038 problem
« on: September 03, 2016, 10:18:37 pm »
Since I want to keep a trace of all connections to my network, I set the lease time of DHCP to a huge value. When I checked on some clients I saw the the expiry date was set to 2038-01-19 03:14:06 UTC. IT means that the DHCP implementation used by Zentyal uses the 32 bits version of the time routines.

The OS uses the 64 bits version of the time routines (date --date='@999999999999999' gives "31690708-07-05 02:46:39 CET" as an answer.)






Jacob

  • Zen Apprentice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Re: DHCP 2038 problem
« Reply #1 on: September 04, 2016, 01:28:21 pm »
Never mind : whether in Linux or in Windows the lease times are stored and displayed in different ways. Then isc-dhcp-server does not seem to handle the lease times correctly (at least they are not stred correctly in the dhcpd.conf file.)

The following results are obtained when setting the default lease times to be used by isc-dhcp-server as installed with Zentyal.

Windows with the default and maximum lease times set to 4294967295 (0xffffffff) as specified in the RFCs 2131 and 1533 :
In the registry :
"Lease"=dword:ffffffff (This is OK.)
"LeaseObtainedTime"=dword:57cbd604 (This will lead to problems in the next century : the maximum value corresponds to 2106-02-07 06:28 UTC.)
"LeaseTerminatesTime"=dword:7fffffff (the maximum of a 32 bits signed integer the resulting date is 2038-01-19...)

Result of ipconfig /all :
Lease Obtained. . . . . . . . . . : 2016-09-04 Sun 10:06:28 (This corresponds with the value from the registry since my time zone is CET.)
Lease Expires . . . . . . . . . . : 2152-10-11 Wed 17:03:47 (This is 0xffffffff seconds in the future at the time one executes the command.)

Linux Ubuntu with the default and maximum lease times set to 4294967295 (0xffffffff) as specified in the RFCs 2131 and 1533 :
  option dhcp-lease-time 4294967295; (OK this corresponds to 0xfffffff.)
  renew 5 2084/09/22 11:22:22; (This is half of 0xffffffff seconds in the future at the time the lease is started)
  rebind 5 2135/10/07 19:47:51; (This is seven eights of 0xffffffff seconds in the future at the time the lease is started)
  expire 3 2152/10/11 14:36:29; (This is 0xffffffff seconds in the future at the time the lease is started)

Linux Ubuntu with the default and maximum lease times set to 10000000000 (more than double the maximum value prescribed byt the RFC's.) :
  option dhcp-lease-time 1410065408; (I don't know where that figure comes from and I am too lazy to dig into it.)
  renew 5 2034/12/08 16:54:15; (I don't know where that figure comes from and I am too lazy to dig into it.)
  rebind never; (THIS is conform to the RFCs although the specified lease time is not.)
  expire never; (THIS is conform to the RFCs although the specified lease time is not.)