host statement scope rules (ISC DHCP 3.0.5b1)
Sten Carlsen
sten at s-carlsen.dk
Sun Jul 30 00:04:10 UTC 2006
If I understand this correctly You say that there is a difference
between placing a host statement in the global scope (i.e. outside all
subnet statements) and placing the host statement within a subnet
declaration.
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.
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?
Phil Pennock wrote:
> On 2006-07-28 at 16:30 -0700, Ted Lemon wrote:
>
>> Furthermore, if you know what you're doing, expressing a host statement
>> in a non-global scope isn't an error. You need to remember that in the
>> DHCP configuration there are actually two sorts of scope: IP address
>> configuration scope, and IP option configuration scope. The two are
>> tied together, but they aren't the same.
>>
>> The mistake people usually make with host declarations is to think "If I
>> declare this in a subnet context, then it will only be in effect for
>> hosts connected to that subnet, and will be ignored otherwise." This
>> is not true: a host declaration matches the intended host if no fixed
>> address is present, or if a fixed address that is present is valid on
>> the network to which the host is connected. And for no other reason.
>>
>> However, a host declaration in a non-global context inherits the options
>> and settings of the context in which it is declared. So moving it to
>> the global scope is not a neutral act - it's going to inherit different
>> configuration settings and options if you do that.
>>
>
> Thank you -- this is exactly what I was trying to express with:
> } Whilst the host statement is matched at a global level, aren't
> } attributes such as lease time values inherited based upon syntactic
> } scope rather than address/netblock matching rules?
> }
> } We have generated configs which use host statements inside subnet
> } scopes, knowing full well that the host statements are matched globally
> } but wanting to be able to inherit values based upon which relay server
> } sent data to us.
>
> I can clarify and note that we don't use dynamic leases, but use DHCP
> for fixed-address assignment.
>
> So yes, we have some configs which are actively relying upon being able
> to set different lease-times and different DNS servers (for crude
> load-balancing) based upon which relay-server forwarded the DHCP packets
> to us, ie which subnet is in use.
>
> Given that there _IS_ valid reason to place a host declaration within a
> subnet syntactic scope, is it possible that ISC could consider having a
> "I'm not being stupid" option which can be turned on to disable this
> warning, please?
>
> Thanks,
>
--
Best regards
Sten Carlsen
No improvements come from shouting:
"MALE BOVINE MANURE!!!"
More information about the dhcp-users
mailing list