dhcpd.conf logical hierachy

Bill Shirley bill at c3po.polymerindustries.biz
Wed Oct 18 19:30:41 UTC 2017


You do not need subnet-mask, router, broadcast-address, or domain-name-servers
in the group unless they override an option.  They will be supplied by the subnet.
Defining them in the group clause doesn't "hurt" anything though.

Bill

On 10/18/2017 3:19 PM, Narcis Garcia wrote:
> Any way I define the static pool, error messages occur.
> This is the only configuration I've reached without errors when a known
> host connects, but I might not be defining subnet/interface where static
> cases are attached to:
>
> subnet 172.16.0.0 netmask 255.255.0.0 {
>          option subnet-mask 255.255.0.0;
>          option routers 172.16.20.100;
>          option broadcast-address 172.16.255.255;
>          option domain-name-servers 172.16.21.61;
>          pool {
>                  # IP range to be assigned dynamically
>                  range 172.16.20.150 172.16.20.189;
>                  allow unknown-clients;
>          }
> }
> group MyReservations {
>          option subnet-mask 255.255.0.0;
>          option routers 172.16.20.100;
>          option broadcast-address 172.16.255.255;
>          option domain-name-servers 172.16.21.61;
>          host printer_1 {
>                  hardware ethernet 00:11:22:33:44:55;
>                  fixed-address 172.16.20.201;
>          }
> }
>
>
> El 18/10/17 a les 20:37, Bruce Hudson ha escrit:
>> On Wed, Oct 18, 2017 at 07:21:15PM +0200, Narcis Garcia wrote:
>>
>>> Better now?
>>>
>>> shared-network MyMap_interface1 {
>>>          subnet 172.16.0.0 netmask 255.255.0.0 {
>>>                  option routers 172.16.20.100;
>>>                  option broadcast-address 172.16.255.255;
>>>                  option domain-name-servers 172.16.21.61;
>>>                  pool {
>>>                          # IP range to be assigned dynamically
>>>                          range 172.16.20.150 172.16.20.189;
>>>                  }
>>>                  pool {
>>>                          # IP ranges to be assigned statically
>>>                          range 172.16.20.0 172.16.20.149;
>>>                          range 172.16.20.190 172.16.20.255;
>>>                          deny unknown-clients;
>>>                          host printer_1 {
>>>                                  hardware ethernet 00:11:22:33:44:55;
>>>                                  fixed-address 172.16.20.201;
>>>                          }
>>>                  }
>>>          }
>>> }
>>>
>>>
>>> Remember: My goal is to use dynamic and static specifications in same
>>> subnet, and also avoid this error message:
>>> Dynamic and static leases present for 172.16.20.201
>>> Remove host declaration printer_1 or remove 172.16.20.201
>>       The "shared-network" adds nothing with only one subnet but hurts
>> nothing. There is no problem with static and dynamic in the same subnet.
>> The issue is including the static IP addresses in your range statement.
>> To avoid the error, just do two (or three) range statements.
>>
>> 		> pool {
>> 		>    range 172.16.20.190 172.16.20.200;
>> 		>    range 172.16.20.202 172.16.20.255;
>> 		>    ...
>> 		> }
>>
>>      Then put the host statements at the global scope level so they so not
>> accidentally inherit when they shouldn't.
>>
> _______________________________________________
> dhcp-users mailing list
> dhcp-users at lists.isc.org
> https://lists.isc.org/mailman/listinfo/dhcp-users



More information about the dhcp-users mailing list