32.5M dhcpd.conf with 108000 classes is parsed for 40 minutes. Is this ok?

michael kapelko kornerr at gmail.com
Fri May 15 05:05:42 UTC 2009


Hi.
I have generated dhcpd.conf from DB with real classes (~38000) and
faked ones (~70000, to test for user count growth) resulting in a
config with ~108000 classes.
It looks like this:

ddns-update-style none;
min-lease-time 120;
default-lease-time 150;
max-lease-time 180;
local-address 10.102.101.13;
subnet 0.0.0.0 netmask 0.0.0.0 {

- - - - many lines - - - -

class "10.102.100.100:1" {
	match if (binary-to-ascii(10, 8, "", suffix(option agent.circuit-id,
1)) = "1") and
	         (binary-to-ascii(10, 8, ".", packet(24, 4)) = "10.102.100.100");
}
pool {
	range 10.102.100.177;
	option routers 10.102.100.1;
	option subnet-mask 255.255.255.0;
	allow members of "10.102.100.100:1";
}

class "10.102.100.100:2" {
	match if (binary-to-ascii(10, 8, "", suffix(option agent.circuit-id,
1)) = "2") and
	         (binary-to-ascii(10, 8, ".", packet(24, 4)) = "10.102.100.100");
}
pool {
	range 10.102.100.162;
	option routers 10.102.100.1;
	option subnet-mask 255.255.255.0;
	allow members of "10.102.100.100:2";
}

class "10.102.100.100:3" {
	match if (binary-to-ascii(10, 8, "", suffix(option agent.circuit-id,
1)) = "3") and
	         (binary-to-ascii(10, 8, ".", packet(24, 4)) = "10.102.100.100");
}
pool {
	range 10.102.100.14;
	option routers 10.102.100.1;
	option subnet-mask 255.255.255.0;
	allow members of "10.102.100.100:3";
}

class "10.102.100.100:4" {
	match if (binary-to-ascii(10, 8, "", suffix(option agent.circuit-id,
1)) = "4") and
	         (binary-to-ascii(10, 8, ".", packet(24, 4)) = "10.102.100.100");
}
pool {
	range 10.102.100.193;
	option routers 10.102.100.1;
	option subnet-mask 255.255.255.0;
	allow members of "10.102.100.100:4";
}

class "10.102.100.100:48" {
    match if (binary-to-ascii(10, 8, "", suffix(option
agent.circuit-id, 1)) = "48") and
             (binary-to-ascii(10, 8, ".", packet(24, 4)) = "10.102.100.100");
}
pool {
    range 10.102.100.124;
    range 10.102.100.125;
    option routers 10.102.150.1;
    option subnet-mask 255.255.255.0;
    allow members of "10.102.100.100:48";
}

- - - - many lines - - - -

}

Class matches a rule when a DHCP message has giaddr field setup and
Relay agent info option present. We want to use it for a network of
D-Link's.
The compressed dhcpd.conf can be downloaded from here [750K]:
http://kornerr.alfamoon.com/download/dhcpd.conf.bz2
I wonder if it's normal for such a config to be parsed for such a long
time on [Core2Duo 1.8GHz / CentOS 5 Final / DHCP Server V3.0.5-RedHat]
Thanks.



More information about the dhcp-users mailing list