LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Bad subnet/netmask , DHCP installation (https://www.linuxquestions.org/questions/linux-newbie-8/bad-subnet-netmask-dhcp-installation-4175541655/)

Pierrick 05-05-2015 03:47 AM

Bad subnet/netmask , DHCP installation
 
Hi,

I'm on WMware workstation with debian Wheezy.
I have a problem when a restart the Dchp.
It said Bad subnet number/mask combination.

This is logs:

root@debian-main:/# /etc/init.d/isc-dhcp-server restart
dhcpd self-test failed. Please fix /etc/dhcp/dhcpd.conf.
The error was:
Internet Systems Consortium DHCP Server 4.3.1
Copyright 2004-2014 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/
Config file: /etc/dhcp/dhcpd.conf
Database file: /var/lib/dhcp/dhcpd.leases
PID file: /var/run/dhcpd.pid
/etc/dhcp/dhcpd.conf line 50: subnet 192.168.10.1 netmask 255.255.255.0: bad subnet number/mask combination.
subnet 192.168.10.1 netmask 255.255.255.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.

And this my file dhcpd.conf:

# A slightly different configuration for an internal subnet.
subnet 192.168.10.1 netmask 255.255.255.0{
range 192.168.10.1 192.168.10.15;
# option domain-name-servers ns1.internal.example.org;
# option domain-name "internal.example.org";
option routers 192.168.10.254;
option broadcast-address 192.168.10.255;
default-lease-time 600;
max-lease-time 7200;
}

For me it's the good subnet number/mask combination.

Can you help me please?

Thanks you,

Pierrick

millgates 05-05-2015 04:52 AM

Quote:

Originally Posted by Pierrick (Post 5358091)
And this my file dhcpd.conf:
Code:

subnet 192.168.10.1 netmask 255.255.255.0{

How about this:
Code:

subnet 192.168.10.0 netmask 255.255.255.0{

Pierrick 05-05-2015 05:19 AM

It works!

Thanks you !


All times are GMT -5. The time now is 02:54 AM.