<div dir="ltr"><br><div class="gmail_quote"><div dir="ltr">On Mon, Aug 20, 2018 at 11:43 AM Dave C <<a href="mailto:Dhcp@gvtc.drakkar.org">Dhcp@gvtc.drakkar.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I've been leveraging include files for what seems like forever.<br>
<br>
Think of an include file as if you dropped whatever was pointed to it into your config at that <br>
exact point.<br>
<br>
So, to answer your question, if you have a "global" type directive above that point in your <br>
config file "stream", then it's still active until it is overwritten with a later directive.<br>
<br>
You can even set an include into the middle of a config construct, for example, you can open a <br>
shared-network configuration, then include individual files for different aspects of the <br>
configuration, then close the shared-network and continue your config stream. I heavily leverage <br>
this so that I can have tools like dhcpd-pools run against a filtered version of my "master <br>
dhcp" config that removes the private subnets that are included in a shared network (for our <br>
internal devices). Otherwise those massive private subs would mask a public pool from showing <br>
it's empty of IPs or about to run out.<br>
<br>
The privates are used for things like video set top boxes etc and need to co-exist in the same <br>
shared network, but don't need to have external public IPs.<br>
<br>
Hope this helps... includes simply insert a big set of text into the stream at their location. <br>
Period.<br>
<br>
Dave<br></blockquote><div><br></div><div>That brings to mind a question - for DNS (BIND) I can use "named-checkconf -p" to print out a 'named.conf' file that has all the 'includes' processed, and comes out as one big file, so I can verify that it is actually getting what I expected.</div><div><br></div><div>Is there an equivalent of "named-checkconf -p" for dhcpd ?</div><div><br></div><div>-- </div><div>Bob Harold</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On 8/20/18 09:25, project722 wrote:<br>
> Hi guys!<br>
> <br>
> We are about to start using multiple config files for our dhcp markets.<br>
> <br>
> I've created a folder called "include.d". The path is:<br>
> <br>
> /etc/dhcp/include.d/<br>
> <br>
> In my main dhcpd conf I've added the "include" directive:<br>
> <br>
> include "/etc/dhcp/include.d/another-config.conf";<br>
> <br>
> Inside the "anotherconfig" file I have started off the file with the "subnet" directive.<br>
> <br>
> subnet 192.168.100.0 netmask 255.255.255.0 {<br>
> <br>
> etc..,etc..<br>
> <br>
> I have no global config. Things such as:<br>
> <br>
> authoritative;<br>
> ddns-update-style none;<br>
> option domain-name-servers x.x.x.x x.x.x.x;<br>
> default-lease-time 604800;<br>
> <br>
> Do I need to define these in my "anotherconfig" conf file? Or will it inherit the global <br>
> directives by design?<br>
> <br>
> TIA!<br><br>
</blockquote></div></div>