Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

For a network interface, I have defined a range of addresses for DHCP.

3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN qlen 1000
link/ether 08:00:27:5a:3e:be brd ff:ff:ff:ff:ff:ff
inet 10.0.2.1/24 brd 10.0.2.255 scope global eth1

and the dhcpd.conf file contains

subnet 10.0.2.1 netmask 255.255.255.240 {
  range 10.0.2.2 10.0.2.10;
  allow booting;
  allow bootp;
  class "pxeclients" {
    match if substring(option vendor-class-identifier, 0, 9) = "PXEClient";
    next-server 10.0.2.3;
    filename "pxelinux.0";
 }
}

However, when I start the dhcpd, i get this error

/etc/dhcp/dhcpd.conf line 1: subnet 10.0.2.1 netmask 255.255.255.240: bad subnet number/mask combination.
subnet 10.0.2.1 netmask 255.255.255.240 
                                    ^
Configuration file errors encountered -- exiting

What is the problem?

share|improve this question

1 Answer 1

up vote 3 down vote accepted

You gave an IP address inside the subnet instead of the address of the subnet itself. Replace subnet 10.0.2.1 with subnet 10.0.2.0, and it should work.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.