Class matching

Luka dhcp at ml.evriala.net
Fri Oct 1 09:19:25 UTC 2010


Hi,

I have a problem with matching classes from different pools. I have two,
almost identical classes:

class "a" {
	match if (substring(hardware,1,3) = 00:01:02);
	option tftp-server-name "10.0.0.1";
}

class "b" {
	match if (substring(hardware,1,3) = 00:01:02);
	option tftp-server-name "10.0.0.2";
}

Subnets are declared as such:

subnet 192.168.1.0 netmask 255.255.255.0 {
	option routers 192.168.1.1;
	option subnet-mask 255.255.255.0;
	option broadcast-address 192.168.1.255;
	pool {
		allow members of "a";
		range 192.168.1.2 192.168.1.254;
	}
}

subnet 192.168.2.0 netmask 255.255.255.0 {
	option routers 192.168.2.1;
	option subnet-mask 255.255.255.0;
	option broadcast-address 192.168.2.255;
	pool {
		allow members of "b";
		range 192.168.2.2 192.168.2.254;
	}
}

When clients come from 192.168.2.0/24 network, they get the address from
the second pool, which means they match class b, but the tftp server
sent is from class a. If I comment out the tftp option in class a, then
the clients get the right tftp option.

There aren't any global tftp options in the rest of the configuration
and no duplicate pools were created.

I think I'm missing something, but just can't see it.






More information about the dhcp-users mailing list