having Issus with configuring DHCP server

Issues related to configuring your network
Post Reply
SioYoo
Posts: 2
Joined: 2020/05/28 12:49:35

having Issus with configuring DHCP server

Post by SioYoo » 2020/05/28 12:56:03

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?

User avatar
jlehtone
Posts: 4530
Joined: 2007/12/11 08:17:33
Location: Finland

Re: having Issus with configuring DHCP server

Post by jlehtone » 2020/05/28 15:53:22

Isn't 192.168.200.0 just an IP address within a /20 block?

subnet 192.168.192.0 netmask 255.255.240.0

SioYoo
Posts: 2
Joined: 2020/05/28 12:49:35

Re: having Issus with configuring DHCP server

Post by SioYoo » 2020/05/28 16:28:36

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?

User avatar
jlehtone
Posts: 4530
Joined: 2007/12/11 08:17:33
Location: Finland

Re: having Issus with configuring DHCP server

Post by jlehtone » 2020/05/28 18:00:22

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.

Post Reply