*** From dhcp-server -- To unsubscribe, see the end of this message. ***
>Briefly, scoping is lexical - that is, it's just as you write it.
>Clients can appear in as many as four kinds of root scopes at the same
>time: class scopes, host declaration scopes, subnet declaration scopes
>and pool declaration scopes. The scopes a client appears in depend on
>what it matches - if it's going to get an address, it'll always match
>some subnet scope. If it's got a host declaration, it matches that
>host declaration's scope. If it's matches any class declarations,
>it's in the scope of all those class declarations. If its address
>comes from a pool, it matches that pool's scope as well.
>
>The most specific scope wins if there's a conflict between parameter
>or option definitions in different scopes. The scopes that apply to
>any given client are the scopes outer from its pool declaration, its
>subnet declaration, its class declarations (if it matches any) and
>it's host declarations, if it matches any. Host declarations are more
>specific than classes, which are more specific than pools.
One thing I've found counter-intuitive is the handing of global parameters.
Effectively, for any hosts that have their own host declaration, global
parameters override subnet parameters. For example:
option domain-name "foo.com";
subnet 10.0.10.0 netmask 255.255.255.0 {
option domain-name "bar.foo.com";
}
host xyz {
hardware-address ethernet 00:11:22:33:44:55;
fixed-address 10.0.10.1;
};
When host xyz requests DHCP, it will get domain-name "foo.com", not
"bar.foo.com", even though it would (at least to me, at first glance)
appear as if it should be bar.foo.com, because "subnet" is more specific
that "global".
But the reality is that there is no "global" scope. Global is really
nothing more than a large group. In the above example, "xyz" is associated
with two scopes: The host scope and the subnet scope. In the host scope,
we have "domain-name foo.com" because it inherits everything above it,
including the global "domain-name foo.com". In the subnet-scope, we have
"domain-name x.foo.com" because it is specified in the subnet declaration.
(If the subnet declaration did not have a "domain-name" option statement,
then the subnet declaration would also have "domain-name foo.com" because
it would inherit that from above.) (Note: Above means "at a higher level
in the group hierarchy" -- which doesn't necessarily include everything
above it in the configuration file.)
So, since the host scope (foo.com) overrides the subnet scope (x.foo.com),
the host gets "foo.com".
I'm not sure if the above increases or decreases the level of confusion ...
-- Brett
------------------------------------------------------------------------------
To unsubscribe from this list, please visit http://www.fugue.com/dhcp/lists
If you are without web access, or if you are having trouble with the web page,
please send mail to [EMAIL PROTECTED] Please try to use the web
page first - it will take a long time for your request to be processed by hand.
Archives for this mailing list are available at
http://www.webnology.com/list-archives/dhcp/dhcp-server
------------------------------------------------------------------------------