Common settings

Mike Richardson mike.richardson at manchester.ac.uk
Wed Nov 30 10:17:04 UTC 2016


On Wed, Nov 30, 2016 at 09:46:59AM +0000, Simon Hobson wrote:
> Mike Richardson <mike.richardson at manchester.ac.uk> wrote:
> 
> > An enhancement along the lines of 'force option blah' would be nice, which
> > takes precedent over other ones when its section matches a client.
> 
> It's not clear what you are looking to do here.
> 
> You mention "matches a client", but earlier you talk about options for each subnet.

In the way that a client will match a subnet that's suitable for it. I
wasn't quite sure of what terminology to use. When a client asks for an
address it will 'match' a subnet and maybe a class and maybe a group and
maybe a host. Precendence determines which of these matches will be the one
to return the option value. 

If a client matches a subnet and a class and a host and the same option is
set for all three (say, default-lease) then the one defined in the host will
be the one used. However, if 'force default-lease' were set in the subnet
then that would be the one used. 

> Your first message had me thinking that you are wanting to reduce the amount of this in the config :
> subnet blah... {
>   option dns_servers ...;
>   option ...
>   option ...
>   ...
> }

Yep, that's the idea.

> As stated, there isn't really a great scope for reducing that.
> You can see the most common options globally, so for example if 80% of your subnets use the same DNS servers, you could set that option globally and only set it per-subnet where it's different.
> Or, as you hint at, if you have a small number of common sets of options, you can set them in include files :
> subnet blah... {
>   $INCLUDE user_subnet_options ;
>   ...
> }

In practice the split would be roughly equal across several groups of
subnets, each group consisting of 256 declarations (splitting /16s into
/24s). 

> The only other construct I can think of (and I don't know if this would work) is the group { ... } structure. Eg :
> #User subnets
> group {
>   option blah...;
>   option blah...;
>   subnet blah...{
>     ...
>   }
>   subnet blah...{
>     ...
>   }
>   ...
> }
> According to The DHCP Handbook, "You can use the group declaration to provide a common scope for whatever is declared within it. For example, if several host declarations require the same set of parameters ..."
> There doesn't seem to be any suggestion it can't be used for subnets.

Ok, I'd looked at the group option but had only seen it used in the context
of hosts. I'll give it a go.

Thanks,

Mike

-- 
Mike Richardson
Networks (network at manchester.ac.uk)
IT Services, University of Manchester
*Plain text only please - attachments stripped on arrival*


More information about the dhcp-users mailing list