LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 02-17-2024, 09:55 PM   #1
mfoley
Senior Member
 
Registered: Oct 2008
Location: Columbus, Ohio USA
Distribution: Slackware
Posts: 2,610

Rep: Reputation: 180Reputation: 180
No subnet declaration for eth0 (no IPv4 addresses).


I'm running dhcpd on Slackware 15.0. I get the following message in syslog:
Code:
Feb 16 19:24:59 mail dhcpd: No subnet declaration for eth0 (no IPv4 addresses).
Feb 16 19:24:59 mail dhcpd: ** Ignoring requests on eth0.  If this is not what
Feb 16 19:24:59 mail dhcpd:    you want, please write a subnet declaration
Feb 16 19:24:59 mail dhcpd:    in your dhcpd.conf file for the network segment
Feb 16 19:24:59 mail dhcpd:    to which interface eth0 is attached. **
Feb 16 19:24:59 mail dhcpd:
Feb 16 19:24:59 mail dhcpd: Not configured to listen on any interfaces!
My subnet declaration in /etc/dhcpd.conf is:
Code:
authoritative;

zone hprs.local. { primary 192.168.0.2; }
zone 0.168.192.in-addr.arpa. { primary 192.168.0.2; }

subnet 192.168.0.0 netmask 255.255.255.0 {
    option routers 192.168.0.1;
    range 192.168.0.100 192.168.0.254;
    option domain-name-servers 192.168.0.2;
    option domain-name "hprs.local";
    ddns-domainname = "hprs.local.";
    ddns-rev-domainname = "in-addr.arpa.";
}
dhcpd works fine on this network, so what is this error about?

I've found plenty of Internet postings on this but no actual explanation.
 
Old 02-18-2024, 10:48 AM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,783

Rep: Reputation: 5936Reputation: 5936Reputation: 5936Reputation: 5936Reputation: 5936Reputation: 5936Reputation: 5936Reputation: 5936Reputation: 5936Reputation: 5936Reputation: 5936
I had thought the "interfaces" file was not required any more. Usually it is /etc/default/isc-dhcp-server where you need the lines
Quote:
INTERFACESv4="eth0"
INTERFACESv6=""
Whether you need the "v4" and/or "v6" depends on the ISC dhcp server version you are running. I am not sure how slackware has the dhcp server configured for the isc-dhcp-server file.
 
Old 02-18-2024, 07:53 PM   #3
mfoley
Senior Member
 
Registered: Oct 2008
Location: Columbus, Ohio USA
Distribution: Slackware
Posts: 2,610

Original Poster
Rep: Reputation: 180Reputation: 180
The dhcpd version is isc-dhcpd-4.4.3-P1. I've gone ahead and put "INTERFACESv4="eth0" into /etc/default/isc-dhcp-server (which didn't exist). We'll see what happens. I'm not sure why /etc/default/isc-dhcp-server would be needed as one can specify the interface on the dhcpd command line (which I always have done), and if not specified dhcpd will look for available interfaces -- of which I only have one.

Could this possibly be an erroneous error?
 
Old 02-18-2024, 09:39 PM   #4
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,783

Rep: Reputation: 5936Reputation: 5936Reputation: 5936Reputation: 5936Reputation: 5936Reputation: 5936Reputation: 5936Reputation: 5936Reputation: 5936Reputation: 5936Reputation: 5936
I don't know. It could be an error.

Last edited by michaelk; 02-19-2024 at 11:01 AM.
 
Old 02-19-2024, 11:00 AM   #5
mfoley
Senior Member
 
Registered: Oct 2008
Location: Columbus, Ohio USA
Distribution: Slackware
Posts: 2,610

Original Poster
Rep: Reputation: 180Reputation: 180
I haven't seen this "No subnet declaration for eth0" message reappear for several days, despite rebooting, and manually restarting dhcpd several time. Perhaps there was some config issue afoot. I've give this a few more days and if still no repeat I'll pretend it never happened and close this thread.
 
Old 02-19-2024, 11:16 AM   #6
Preethi1
LQ Newbie
 
Registered: Feb 2024
Posts: 3

Rep: Reputation: 0
Quote:
Originally Posted by mfoley View Post
I haven't seen this "No subnet declaration for eth0" message reappear for several days, despite rebooting, and manually restarting dhcpd several time. Perhaps there was some config issue afoot. I've give this a few more days and if still no repeat I'll pretend it never happened and close this thread.
It's hopeful that the "No subnet declaration for eth0" notice hasn't returned after rebooting and restarting dhcpd. If it remains resolved, it may suggest that a configuration issue was resolved over time.
 
  


Reply

Tags
dhcpd, subnet



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
No subnet declaration for eth0 when runnig dhcpd nicolaus Linux - Networking 3 02-16-2013 06:49 AM
[SOLVED] No subnet declaration for eth0 windstory Linux - Newbie 4 11-21-2011 07:34 PM
Binding 2 NICs (MAC addresses) to 2 IP Addresses in same Subnet RedHat EL4.0 skhira Linux - Networking 13 02-24-2008 08:16 PM
Binding 2 NICs (MAC addresses) to 2 IP Addresses in same Subnet RedHat EL4.0 skhira Linux - Networking 1 02-09-2008 07:17 AM
No subnet declaration for eth0 jakobsg Linux - Networking 6 09-04-2006 11:52 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 10:15 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration