Client tied to pool via (sub)class in one subnet, same client has host declaration in other subnet...

Christian Marg marg at
Thu Sep 19 14:32:09 UTC 2013


On 19.09.2013 11:34, Sten Carlsen wrote:
> You have put the host declaration inside the subnet declaration.
> When you do that, it has the side effect that it will get its router and
> some other settings from that subnet.

We actually rely on that - we have about 70 different subnets with about 
4500 host declarations. I don't like the idea to define "option routers" 
etc. per host...

man dhcpd.conf says:
When a client is to be booted, its boot parameters are determined by
consulting that client's host declaration (if any), and then consulting
any class declarations matching the client, followed by the pool, sub-
net and shared-network declarations for the IP address assigned to the

So the problem is not the placement of the host declarations but the 
fact that the class declaration ties the host to a pool, which in turn 
is called more "specific" than a subnet declaration...

Maybe a workaround would be using "group" statements to group the hosts 
that belong to a subnet, and define routers etc. in that group.

It seems that group-specific statements would count as "host-specific" 
in the above line from the manpage...

> The general advice is to have all
> host declarations outside all subnet declarations as they are global in
> scope no matter where they are placed, inheritance is from where they
> are placed.

So a host declared globally will inherit the subnet parameters because 
it's IP adress belongs to the subnet? I think we went for host 
declarations inside of subnet declarations because it's a little more 

> It could also look like the class and subclass declarations inherit form
> the subnets they are placed in. I suggest to move them to outside all
> subnets, they are global anyway.

I already moved the class and subclass declaration out of the subnet - 
no change in behaviour. Of course the pool was still in the subnet, but 
where else would it be.

kind regards,

Christian Marg
Christian Marg                  mail  : mailto:marg at
Rechenzentrum TU Clausthal      web   :
D-38678 Clausthal-Zellerfeld    fon   : 05323/72-2626
Germany                         jabber: ifcma at

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4897 bytes
Desc: S/MIME Cryptographic Signature
URL: <>

More information about the dhcp-users mailing list