host statement scope rules (ISC DHCP 3.0.5b1)

Simon Hobson dhcp1 at thehobsons.co.uk
Sun Jul 30 06:36:52 UTC 2006


Phil Pennock wrote:

>  > I think there was just now a thread which made a big point out of
>>  stating that there is absolutely no difference where in the file you put
>>  host statements.
>
>Ted Lemon pointed out that there is a difference and described it; the
>difference is exactly the point which I raised in the first place,
>starting the thread.
>
>I trust the author of dhcpd to be correct.  ;^)

Which is worrying as I'm sure Ted is one of the people telling us 
that there is no difference for ages - even if he hasn't said it 
himself, it's the first time anyone has queried 'accepted wisdom' of 
the list.

>  > I seem to be a little confused; what is correct? Does it or does it not
>>  matter where in the file you put the host statement?
>
>It does matter, but not in the way which most people think.
>
>Matching a host declaration is not dependent upon where the host
>declaration is and later host declarations overwrite earlier ones.
>
>If a shared network or subnet sets particular options, such as DHCP
>servers or lease-times, then those are inherited based upon syntax --
>ie, where in the config file the host declaration is.

And that is very different from what we have been told on this list 
several times in the past.


It's probably good that this has come up - perhaps we can get this 
out in the open and sorted one way or another. Personally I think it 
makes for a broken config if a host declaration inherits properties 
syntactically (from an enclosing subnet), but then gets used in a 
different subnet where different properties may apply.

Simon


More information about the dhcp-users mailing list