matching performance

John Hascall john at iastate.edu
Fri Sep 24 11:43:27 UTC 2010



> A sub-class is probably going to be more efficient as it uses a hashed 
> lookup. Of course, unless there were many 000's of such entries it's not 
> likely to make much difference either way on decent hardware. eg:
> 
> class "dns1" {
> 	match option agent.remote-id;
> 	option domain-name-servers 127.0.0.1;
> }
> sub-class "dns1" 0A:00:3E:F0:5C:84;
> sub-class "dns1" 0A:00:3E:F0:7C:7C;
> sub-class "dns1" 0A:00:3E:F0:6D:3E;
> 
> Of course you can have as many different classes and sub-classes as 
> required. You could even have the sub-class statements in a separate 
> file that you included, if you wanted to generate them with a script, 
> for example.

A subclass (no '-', BTW) is definitely the way to go.  It's cleaner
and more efficient (I just looked and we have nearly 40,000 subclasses
in our config file with no performance issues at all).

John



More information about the dhcp-users mailing list