LinuxQuestions.org
Review your favorite Linux distribution.
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 09-03-2006, 05:33 PM   #1
jakobsg
LQ Newbie
 
Registered: Sep 2006
Posts: 5

Rep: Reputation: 0
No subnet declaration for eth0


My dhcp3-server is acting strangely (in my oppinion). I can't start the service, and when I look in the daemin.log afterwards I can see the following reported problem:

#tail /var/log/daemon.log
Code:
Sep  4 00:29:17 ltsp1 dhcpd: No subnet declaration for eth0 (192.168.50.1).
Sep  4 00:29:17 ltsp1 dhcpd: ** Ignoring requests on eth0.  If this is not what
Sep  4 00:29:17 ltsp1 dhcpd:    you want, please write a subnet declaration
Sep  4 00:29:17 ltsp1 dhcpd:    in your dhcpd.conf file for the network segment
Sep  4 00:29:17 ltsp1 dhcpd:    to which interface eth0 is attached. **
Sep  4 00:29:17 ltsp1 dhcpd:
Sep  4 00:29:17 ltsp1 dhcpd:
Sep  4 00:29:17 ltsp1 dhcpd: Not configured to listen on any interfaces!
I have seen meny post this error but the solutions I have found don't seem to match my problem. It tells me "No subnet declaration for eth0 (192.168.50.1)" but that's not true:

#ifconfig eth0
Code:
eth0      Link encap:Ethernet  HWaddr 00:0D:88:64:A2:32
          inet addr:192.168.50.1  Bcast:192.168.50.255  Mask:255.255.255.0
          inet6 addr: fe80::20d:88ff:fe64:a232/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 b)  TX bytes:670 (670.0 b)
          Interrupt:193
Ubuntu dhcpd interface control file:
#cat /etc/default/dhcp3-server
Code:
INTERFACES="eth0"
#cat /etc/dhcp3/dhcpd.conf
Code:
ddns-update-style none;
option domain-name "";
get-lease-hostnames true;
#option domain-name-servers mainserver.skolesys.local;
log-facility local7;
subnet 192.168.50.0 netmask 255.255.255.0 {
  range 192.168.50.50 192.168.50.254;
  option routers 192.168.50.1;
  default-lease-time 604800;
  max-lease-time 605800;
  filename "pxelinux.0";
  option root-path "192.168.50.1:/opt/ltsp/i386";
}
Can anybody see a problem anywhare?

Best regards Jakob
 
Old 09-03-2006, 06:21 PM   #2
camh
Member
 
Registered: Feb 2005
Distribution: Slack/Debian
Posts: 163
Blog Entries: 2

Rep: Reputation: 33
Try adding the line

Code:
DHCPDARGS=eth0;
to the top of dhcpd.conf and see if it works.
 
Old 09-03-2006, 06:26 PM   #3
jakobsg
LQ Newbie
 
Registered: Sep 2006
Posts: 5

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by camh
Try adding the line

Code:
DHCPDARGS=eth0;
to the top of dhcpd.conf and see if it works.
No that didn't work
 
Old 09-03-2006, 06:31 PM   #4
camh
Member
 
Registered: Feb 2005
Distribution: Slack/Debian
Posts: 163
Blog Entries: 2

Rep: Reputation: 33
What happens when you try specifying it on the command line? eg. dhcpd -cf /path/to/dhcpd.conf eth0
 
Old 09-03-2006, 11:53 PM   #5
jakobsg
LQ Newbie
 
Registered: Sep 2006
Posts: 5

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by camh
What happens when you try specifying it on the command line? eg. dhcpd -cf /path/to/dhcpd.conf eth0
It says exactly the same. What's wrong with this configuration or is it dhcp3-server?..
Code:
Internet Systems Consortium DHCP Server V3.0.3
Copyright 2004-2005 Internet Systems Consortium.
All rights reserved.

No subnet declaration for eth1 (10.1.0.50).
** Ignoring requests on eth1.  If this is not what
   you want, please write a subnet declaration
   in your dhcpd.conf file for the network segment
   to which interface eth1 is attached. **

Listening on LPF/eth0/00:0d:88:64:a2:32/192.168.50/24
Sending on   LPF/eth0/00:0d:88:64:a2:32/192.168.50/24
Sending on   Socket/fallback/fallback-net
 
Old 09-04-2006, 01:19 AM   #6
camh
Member
 
Registered: Feb 2005
Distribution: Slack/Debian
Posts: 163
Blog Entries: 2

Rep: Reputation: 33
It looks like it's working now. It should be listening on eth0 (change the command line to match the interface you want).
 
Old 09-04-2006, 11:52 AM   #7
jakobsg
LQ Newbie
 
Registered: Sep 2006
Posts: 5

Original Poster
Rep: Reputation: 0
Solved!

I finally solved the problem. It looks like an ubuntu/debian issue/feature I had just installed ltsp from the universe repository which installs a dhcpd.conf in /etc/ltsp. I realized this by having a look at the init.d script that starts the dhcp service: (snippet)
Code:
# Allow ltsp to override
if [ -f /etc/ltsp/dhcpd.conf ]; then
       CONFIG_FILE=/etc/ltsp/dhcpd.conf
       break
fi
So watch out debian/ubuntu users.

Best regards Jakob
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 restart (0.0.0.0) changlinn Linux - Networking 11 07-16-2013 09:09 PM
declaration does not declare anything tristanm Programming 5 10-24-2005 04:00 PM
dhcpd subnet declaration problems in dhcpd.conf vcrispo Linux - Networking 6 07-15-2005 10:32 AM
the c declaration kapsikum Programming 3 04-06-2005 02:12 AM
Can IP from different subnet be configured on another subnet russell Linux - Networking 1 08-23-2002 01:47 AM

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

All times are GMT -5. The time now is 05:47 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration