performance with 20000 classes; release a lease manually

Glenn Satchell Glenn.Satchell at
Thu May 28 03:23:19 UTC 2009

You could save some processing by skipping the binary to ascii
conversion and string comparison and doing a straight binary compare.
See man dhcp-eval for string options.

  match if option agent.remote-id = 0:1e:69:ef:8e:b5;

Maybe sub-classes would work better?

class "customer" {
  match agent.remote-id;
sub-class "customer" 0:1e:69:ef:8e:b5 { lease limit 1; }

or if every customer is lease limit 1, then put that in the main class.
See mandhcpd.conf, in the section titled SUBCLASSES.

Host statements should generally be defined in the global scope.
Putting them inside a subnet definition only tells dhcpd where to
inherit from. If that client moves to a different subnet address it
will still inherit from the subnet where it is defined and will pick up
the wrong default route, etc. This can be very confusing to track

There was an update in 4.something, that allowed you to use omshell to
set the end time for a lease to 0. Bit of a hack, because the client
could still think they have a valid lease, but the server doesn't.
Otherwise, stopd dhcpd, edit dhcpd.leases and set the ends time to 0.
Then restart dhcpd.


>Date: Wed, 27 May 2009 17:59:58 +0200
>Subject: performance with 20000 classes; release a lease manually
>From: stefan novak <lms.brubaker at>
>To: dhcp-users at
>X-BeenThere: dhcp-users at
>My config is very simple and works as expected.
>The client behind the cable modem always gets the fixed address. is
>this config scaleable to 20000 classes, or is there another way to
>configure such a scenario.
>My secound question is about the file. is it possible to
>release an already taken lease?
>that if the client behind the cable modem changes, the ip is assigned
>to the new client. is that possible? setting the lease time to 5min.
>seams not the solution for many many clients.....
>class "customer1" {
>         match if binary-to-ascii(16, 8, ":",  option agent.remote-id
>) = "0:1e:69:ef:8e:b5"; # <- Modem Mac
>         lease limit 1;
>shared-network test{
>subnet netmask {
>        option routers;
>        option broadcast-address;
>        option time-servers;
>  host testmodem1 { hardware ethernet 00:1e:69:ef:8e:b5; fixed-address
>; filename "test1.cfg";}
>subnet xx.62.31.0 netmask {
>        option routers xx.62.31.1;
>        option broadcast-address xx.62.31.255;
>        pool {
>                allow members of "customer1";
>                range xx.62.31.15 xx.62.31.15;
>        }
>        pool {
>                deny members of "customer1";
>                range xx.62.31.2 xx.62.31.10;
>        }
>thx Stefan
>dhcp-users mailing list
>dhcp-users at

More information about the dhcp-users mailing list