I've been leveraging include files for what seems like forever.
Think of an include file as if you dropped whatever was pointed to it into your config at that
exact point.
So, to answer your question, if you have a "global" type directive above that point in your
config file "stream", then it's still active until it is overwritten with a later directive.
You can even set an include into the middle of a config construct, for example, you can open a
shared-network configuration, then include individual files for different aspects of the
configuration, then close the shared-network and continue your config stream. I heavily leverage
this so that I can have tools like dhcpd-pools run against a filtered version of my "master
dhcp" config that removes the private subnets that are included in a shared network (for our
internal devices). Otherwise those massive private subs would mask a public pool from showing
it's empty of IPs or about to run out.
The privates are used for things like video set top boxes etc and need to co-exist in the same
shared network, but don't need to have external public IPs.
Hope this helps... includes simply insert a big set of text into the stream at their location.
Period.
Dave
On 8/20/18 09:25, project722 wrote:
> Hi guys!
>
> We are about to start using multiple config files for our dhcp markets.
>
> I've created a folder called "include.d". The path is:
>
> /etc/dhcp/include.d/
>
> In my main dhcpd conf I've added the "include" directive:
>
> include "/etc/dhcp/include.d/another-config.conf";
>
> Inside the "anotherconfig" file I have started off the file with the "subnet" directive.
>
> subnet 192.168.100.0 netmask 255.255.255.0 {
>
> etc..,etc..
>
> I have no global config. Things such as:
>
> authoritative;
> ddns-update-style none;
> option domain-name-servers x.x.x.x x.x.x.x;
> default-lease-time 604800;
>
> Do I need to define these in my "anotherconfig" conf file? Or will it inherit the global
> directives by design?
>
> TIA!
>
>
>
>
>
>
>
> _______________________________________________
> dhcp-users mailing list
>
[hidden email]
>
https://lists.isc.org/mailman/listinfo/dhcp-users>
_______________________________________________
dhcp-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users