Page 1 of 1

having Issus with configuring DHCP server

Posted: 2020/05/28 12:56:03
by SioYoo
I have this issue when I am trying to configuring my DHCP server using dhcpd

I was trying to assign a subnet with network address 192.168.200.0/20
however when I tried to configure the DHCP with following configuration

subnet 192.168.200.0 netmask 255.255.240.0 {
pool {
range 192.168.200.2 192.168.200.254;
default-lease-time 600;
option routers 192.168.192.1;
}
}

it shows up an error message:

Internet Systems Consortium DHCP Server 4.3.3
Copyright 2004-2015 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/
/etc/dhcp/dhcpd.conf line 8: subnet 192.168.200.0 netmask 255.255.240.0: bad subnet number/mask combination.
subnet 192.168.200.0 netmask 255.255.240.0
^
Configuration file errors encountered -- exiting

If you think you have received this message due to a bug rather
than a configuration issue please read the section on submitting
bugs on either our web page at www.isc.org or in the README file
before submitting a bug. These pages explain the proper
process and the information we find helpful for debugging..

exiting.

it says I have a bad subnet number / mask combination, so what should I do to make this subnet have network address with 192.168.200.0/20?
Did I miss understood the way to configure the DHCP server and misunderstood the subnet address and subnet mask?

Re: having Issus with configuring DHCP server

Posted: 2020/05/28 15:53:22
by jlehtone
Isn't 192.168.200.0 just an IP address within a /20 block?

subnet 192.168.192.0 netmask 255.255.240.0

Re: having Issus with configuring DHCP server

Posted: 2020/05/28 16:28:36
by SioYoo
That's what I am confusing about, so, the 192.168.200.0 is just an IP address within this subnet?
Then, if so, according to the subnet mask, the subnet number should be 192.168.192.0 since the first available IP address is 192.168.192.1?
Am I correct?

Re: having Issus with configuring DHCP server

Posted: 2020/05/28 18:00:22
by jlehtone
The 20 most significant bits of every address from 192.168.192.0 to 192.168.207.0
is 192.168.192.0
http://jodies.de/ipcalc?host=192.168.207.255&mask1=20

I presume that the dhcpd really wants that.