Send dhcp-users mailing list submissions to dhcp-users@lists.isc.org
To subscribe or unsubscribe via the World Wide Web, visit https://lists.isc.org/mailman/listinfo/dhcp-users or, via email, send a message with subject or body 'help' to dhcp-users-requ...@lists.isc.org You can reach the person managing the list at dhcp-users-ow...@lists.isc.org When replying, please edit your Subject line so it is more specific than "Re: Contents of dhcp-users digest..." Today's Topics: 1. Are global directives needed in additional dhcpd conf files? (project722) 2. Re: Are global directives needed in additional dhcpd conf files? (Dave C) 3. Re: Are global directives needed in additional dhcpd conf files? (Bob Harold) ---------------------------------------------------------------------- Message: 1 Date: Mon, 20 Aug 2018 09:25:25 -0500 From: project722 <project...@gmail.com> To: Users of ISC DHCP <dhcp-users@lists.isc.org> Subject: Are global directives needed in additional dhcpd conf files? Message-ID: <capbqmzbap-iv+9uhogteowzco5u9igqzpr91-kek2ptyhpk...@mail.gmail.com> Content-Type: text/plain; charset="utf-8" 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! -------------- next part -------------- An HTML attachment was scrubbed... URL: <https://lists.isc.org/pipermail/dhcp-users/attachments/20180820/ed82145d/attachment-0001.html> ------------------------------ Message: 2 Date: Mon, 20 Aug 2018 10:42:56 -0500 From: Dave C <d...@gvtc.drakkar.org> To: Users of ISC DHCP <dhcp-users@lists.isc.org>, project722 <project...@gmail.com> Subject: Re: Are global directives needed in additional dhcpd conf files? Message-ID: <74d58c74-804f-a14f-4486-d9574fb42...@gvtc.drakkar.org> Content-Type: text/plain; charset=utf-8; format=flowed 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 > dhcp-users@lists.isc.org > https://lists.isc.org/mailman/listinfo/dhcp-users > ------------------------------ Message: 3 Date: Mon, 20 Aug 2018 14:31:23 -0400 From: Bob Harold <rharo...@umich.edu> To: Users of ISC DHCP <dhcp-users@lists.isc.org> Subject: Re: Are global directives needed in additional dhcpd conf files? Message-ID: <CA+nkc8C7fa3+xzc-fpoS+MVMtVsez54FQBbziQUP=rf6y3g...@mail.gmail.com> Content-Type: text/plain; charset="utf-8" On Mon, Aug 20, 2018 at 11:43 AM Dave C <d...@gvtc.drakkar.org> wrote: > 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 > 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. Is there an equivalent of "named-checkconf -p" for dhcpd ? -- Bob Harold 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! > > -------------- next part -------------- An HTML attachment was scrubbed... URL: <https://lists.isc.org/pipermail/dhcp-users/attachments/20180820/3a51fc3d/attachment-0001.html> ------------------------------ Subject: Digest Footer _______________________________________________ dhcp-users mailing list dhcp-users@lists.isc.org https://lists.isc.org/mailman/listinfo/dhcp-users ------------------------------ End of dhcp-users Digest, Vol 118, Issue 15 *******************************************