Tag Archives: centos dhcpd No subnet declaration

Centos Dhcpd Error: No subnet declaration [How to Solve]

1.Centos dhcp environment

centos 6.6, dhcp installed via yum, NIC IP: 10.70.11.230/24

2.dhcp configuration file

option domain-name-servers 10.70.11.230;
default-lease-time 432000;
max-lease-time 432000;
authoritative;
ddns-update-style none;
subnet 10.70.12.0 netmask 255.255.255.0{
range dynamic-bootp 10.70.12.10 10.70.12.229;
option broadcast-address 10.70.12.255;
option routers 10.70.12.1;
}

3. The dhcp service starts with an error, and the log is as follows.

Oct 7 10:52:31 sh dhcpd: No subnet declaration for eth0 (10.70.11.230).
Oct 7 10:52:31 sh dhcpd: ** Ignoring requests on eth0. If this is not what
Oct 7 10:52:31 sh dhcpd: you want, please write a subnet declaration
Oct 7 10:52:31 sh dhcpd: in your dhcpd.conf file for the network segment
Oct 7 10:52:31 sh dhcpd: to which interface eth0 is attached. **
Oct 7 10:52:31 sh dhcpd:
Oct 7 10:52:31 sh dhcpd:
Oct 7 10:52:31 sh dhcpd: Not configured to listen on any interfaces!
Oct 7 10:52:31 sh dhcpd:
Oct 7 10:52:31 sh dhcpd: This version of ISC DHCP is based on the release available
Oct 7 10:52:31 sh dhcpd: on ftp.isc.org. Features have been added and other changes
Oct 7 10:52:31 sh dhcpd: have been made to the base software release in order to make
Oct 7 10:52:31 sh dhcpd: it work better with this distribution.
Oct 7 10:52:31 sh dhcpd:
Oct 7 10:52:31 sh dhcpd: Please report for this software via the CentOS Bugs Database:
Oct 7 10:52:31 sh dhcpd: http://bugs.centos.org/
Oct 7 10:52:31 sh dhcpd:
Oct 7 10:52:31 sh dhcpd: exiting.

4.Problem solving method

When configuring the Centos dhcpd service, be sure to include its IP address in the DHCP allocation range.

Adjusted dhcpd.conf

option domain-name-servers 10.70.11.230;
default-lease-time 432000;
max-lease-time 432000;
authoritative;
ddns-update-style none;

subnet 10.70.11.0 netmask 255.255.255.0{
range dynamic-bootp 10.70.11.10 10.70.11.229;
option broadcast-address 10.70.11.255;
option routers 10.70.11.1;
}

subnet 10.70.12.0 netmask 255.255.255.0{
range dynamic-bootp 10.70.12.10 10.70.12.229;
option broadcast-address 10.70.12.255;
option routers 10.70.12.1;
}