dhcpd.conf logical hierachy

Narcis Garcia informatica at actiu.net
Mon Oct 16 07:29:38 UTC 2017


El 15/10/17 a les 23:03, Simon Hobson ha escrit:
> Narcis Garcia <informatica at actiu.net> wrote:
> 
>> Do you mean this setup for example?
>>
>> authoritative;
>> use-host-decl-names on;
>> server-name "director.example.net";
>> subnet 172.16.0.0 netmask 255.255.0.0 {
>>        # IP range to be assigned dinamically
>>        option routers 172.16.20.100;
>>        option broadcast-address 172.16.255.255;
>>        option domain-name-servers 172.16.21.61;
>>        option ntp-servers 172.16.20.100;
>>        pool {
>>                range 172.16.20.150 172.16.20.189;
>>                allow unknown-clients;
>>        }
>> }
>> group MyReservations {
>> # Without defining subnet/mask ?!
>>        option routers 172.16.20.100;
>>        option broadcast-address 172.16.255.255;
>>        option domain-name-servers 172.16.21.61;
>>        option ntp-servers 172.16.20.100;
>>        host printer_1 {
>>                hardware ethernet **:**:**:**:**:**;
>>                fixed-address 172.16.20.201;
>>                option host-name "printer_1";
>>        }
>> }
> 
> Don't define things like routers in the group. All you need to define here is the IP address of each host - the routers, broadcast, DNS etc are all inherited from the subnet the IP address belongs in. You can redefine options if you need them to be different, but in this case, all four of the options you've defined are the same as would be inherited.
> 
> While it won't break anything, it's duplication of settings and that leaves scope for changing one and missing that there's another copy that needs changing - perhaps years down the line when you've completely forgotten how/why you configured it.
> 

Do you mean the [group] outside of [subnet] inherits parameters from
previous clauses?

Anyway, is this a valid (or best) setup to split dynamic and static
definitions for same subnet?


More information about the dhcp-users mailing list