dhcpd.conf logical hierachy
Narcis Garcia
informatica at actiu.net
Wed Oct 18 19:19:28 UTC 2017
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.
>
More information about the dhcp-users
mailing list