host statement scope rules (ISC DHCP 3.0.5b1)

Simon Hobson dhcp1 at thehobsons.co.uk
Tue Aug 1 06:50:58 UTC 2006


David W. Hankins wrote:

>  > Is there any real reason to need the inheritance of putting a host
>>  declaration within a subnet ? I guess it comes down to, will the host
>>  inherit anything that it wouldn't have inherited anyway by virtue of
>>  being 'put there' as the server allocates it to a subnet for lease
>>  allocation purposes ?

>That's just it: the subnet that's found and passed into other
>structures doesn't seem to have any affect on the inherited values.

Are you saying that if a host inherits (for example) the routers 
option from the implicit subnet group, that doesn't seem to get 
overridden by the routers option appropriate to the lease that may be 
handed out ? If so then that is bad and such use really needs to be 
either fixed or deprecated - I fear that trying to adequately 
document it (especially for novice users) will not be easy.

>It's also really unclear to me right now what happens with host
>records with no fixed-address statements.
>
>  > "Whilst host statements may be placed within a subnet or
>>  shared-network declaration, this was not an intentional capability
>>  and its use is deprecated."
>
>I don't think I'm ready to call this behaviour deprecated yet.
>
>I'm willing to call the current behaviour a bug, but not one that
>we can fix in maint (and not one we can fix, it looks, in 3.1).
>
>That is, a flaw in design rather than a flaw in implementation.

OK, how about : "Whilst host statements may be placed within a subnet 
or shared-network declaration, this was not an intentional capability 
(design bug) and the effects are unclear. Such use is not currently 
recommended and will generate a warning."

Of course, if you try to fix it so that it works correctly (whatever 
correctly means !) then you will break any configs that already use 
it.


Sten Carlsen wrote:

>  > Also, if the host inherits something from one subnet (by the host
>>  declaration being within it), and a different value for the same
>>  option when the server puts a client in a different subnet, which
>  > takes precedence ?

>You just hit the point I try to make. I still have not seen anything
>close to a crystal clear definition for what it means to place the host
>statement in different places in the file.
>
>IF there is an unclear point about precedence, like mentioned, I think
>at least a warning to that effect is appropriate. For longer term, I
>think this really needs to be sorted out so it really IS crystal clear.

Time for someone to read the source and work it out - don't look at 
me ! Personally I think that it's better to class it as deprecated 
usage unless someone really can come up with a genuine need for it.


Simon


More information about the dhcp-users mailing list