sending options from wrong subnet in shared-network

John Wobus jw354 at
Mon Dec 9 22:18:49 UTC 2013

On Dec 5, 2013, at 10:50 AM, Brian J. Murrell wrote:
> On Thu, 2013-12-05 at 10:31 -0500, Brian J. Murrell wrote:
>> On Thu, 2013-12-05 at 16:09 +0100, Sten Carlsen wrote:
>>> If they are not,
>>> inheritance will come from that subnet as well, overriding the  
>>> options
>>> in the subnet where the address eventually comes from.
>> Well, if that's a way to force the options from the proper subnet,  
>> then
>> maybe that's my solution, despite this seeming wrong.
> So, yeah.  Moving the host declarations up into the subnet declaration
> forced dhcpd to send the right options.
> I still think this feels wrong though and a hack against what  
> appears to
> be a dhcpd bug.  Not that I'm convinced that it's not a configuration
> error.  I just have a difficult time imagining any configuration that
> should result in getting an ip address from one subnet and the options
> from another in a shared-network configuration.

It sounds wrong to me.   Where did you move the host declaration from?
Was it within some other scope that had these 'wrong option values'

The matching host declaration is the "most specific" declaration for a
matching host and overrides other declarations such as subnet.  This
includes option declarations/values inherited from the scope that
surrounds the host declaration.  This can be VERY confusing and is
why folks say "don't put host declarations within subnet declarations".
It can also be useful, as you found.  (The confusion is that the host
declaration can still apply to a computer on some other subnet.)

If an option is defined globally, then a host declaration in global  
will pick it up, i.e., it's as if you put that option definition in
that host declaration.  If the host declaration resides within a group
declaration, then the host declaration will pick up an option defined
in that group, or if the group does not override a global declaration
for the option, from the globally-defined option.

Thus, what you got could result from parts of the configuration you
haven't shown us.

John Wobus
Cornell IT

More information about the dhcp-users mailing list