Definitive answer for 'how to give short leases to PXE clientsand longer leases to everyone else

Steve van der Burg steve.vanderburg at lhsc.on.ca
Wed Nov 14 13:23:36 UTC 2007


Hi.  In my current DHCP configuration (serving about 6k devices in a partner-pair setup, with ISC DHCPd 3.0.5) I have this right near the top of the file:

   default-lease-time 72000;
   max-lease-time 72000;

   if substring (option vendor-class-identifier, 0, 9) = "PXEClient" {
      option vendor-class-identifier "PXEClient";
      option dhcp-server-identifier pxebootserver.some.domain;
      server-name "pxebootserver.some.domain";
   }

   # followed by a few thousand subnet blocks...

The configuration options inside the if { } block were arrived at after a long and painful trial-and-error process, using hints from the dhcp-users archives.  It works - the PXE clients get pointed to the server that takes care of them, and everyone else works fine.

What I would like to do now is shorten the leases for PXE clients.  After scouring the dhcp-users archives, I was surprised to find a lot of questions but not many answers.  Some messages suggested using a class to do what I have done, and then putting something like

   default-lease-time 3600;
   max-lease-time 3600;

inside the class definition.  Other messages reported that that didn't work.

Would putting the lease-time statements inside my if block properly override the global definitions?  I am tempted to start experimenting, but thought that I would ask here first.

Thanks in advance,

...Steve

  
-- 

Steve van der Burg
Information Management
London Health Sciences Centre
& St. Joseph's Health Care London
(519) 685-8500 ext 35559
steve.vanderburg at lhsc.on.ca

 --------------------------------------------------------------------------------
This information is directed in confidence solely to the person named above and may contain confidential and/or privileged material. This information may not otherwise be distributed, copied or disclosed. If you have received this e-mail in error, please notify the sender immediately via a return e-mail and destroy original message. Thank you for your cooperation.


More information about the dhcp-users mailing list