LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 04-18-2012, 07:16 PM   #1
preacher
LQ Newbie
 
Registered: Mar 2012
Posts: 10

Rep: Reputation: Disabled
dhcpd fails on start up!


I recently installed Ubuntu 11.10 I then used apt-get to grab isc-dhcp3. I removed Network-Manager and manually configured my network interface eth0. In addition, I hand edited a dhcpd.conf file and designated eth0 as the listen interface in /etc/default/isc-dhcp-server. However, each time I attempt to start dhcpd it fails. When I view the syslog file, the last line is as follows: "Not configured to listen on any interfaces!"

My eth0 interface works fine. I can ping addresses inside and outside the network and perform DNS queries.

Any help would be greatly appreciated.
 
Old 04-18-2012, 09:02 PM   #2
Dutch Master
Senior Member
 
Registered: Dec 2005
Posts: 1,686

Rep: Reputation: 124Reputation: 124
Did you check for syntax errors? A missing dot or extra colon throws a wonkey for dhcpd....
 
Old 04-19-2012, 07:32 AM   #3
preacher
LQ Newbie
 
Registered: Mar 2012
Posts: 10

Original Poster
Rep: Reputation: Disabled
Yes, I've checked the syntax to the best of my ability and re-wrote the dhcpd.conf file.

Here is a copy of my dhcpd.conf file:
subnet 192.168.0.0 netmask 255.255.255.0 {
range 192.168.0.26 192.168.0.66;
option domain-name-servers 207.255.176.37;
option domain-name-servers 207.255.176.40;
option routers 192.168.0.2;
option broadcast-address 192.168.0.255;
default-lease-time 600;
max-lease-time 7200;
}
dhcpd.conf (END)
 
Old 04-19-2012, 09:23 AM   #4
Dutch Master
Senior Member
 
Registered: Dec 2005
Posts: 1,686

Rep: Reputation: 124Reputation: 124
This is a working dhcp config file, but it must be noted it's on a private network, i.e. not connected to the internet and the server also provides the DNS server for this (phony) domain:
Code:
#
# Sample configuration file for ISC dhcpd for Debian
#
#

# The ddns-updates-style parameter controls whether or not the server will
# attempt to do a DNS update when a lease is confirmed. We default to the
# behavior of the version 2 packages ('none', since DHCP v2 didn't
# have support for DDNS.)
ddns-update-style none;

# option definitions common to all supported networks...
option domain-name "swisstrak.org";

default-lease-time 600;
max-lease-time 7200;

# If this DHCP server is the official DHCP server for the local
# network, the authoritative directive should be uncommented.
#authoritative;

# Use this to send dhcp log messages to a different log file (you also
# have to hack syslog.conf to complete the redirection).
log-facility local7;

# No service will be given on this subnet, but declaring it helps the 
# DHCP server to understand the network topology.

#subnet 10.152.187.0 netmask 255.255.255.0 {
#}

# This is a very basic subnet declaration.

#subnet 10.254.239.0 netmask 255.255.255.224 {
#  range 10.254.239.10 10.254.239.20;
#  option routers rtr-239-0-1.example.org, rtr-239-0-2.example.org;
#}

# This declaration allows BOOTP clients to get dynamic addresses,
# which we don't really recommend.

#subnet 10.254.239.32 netmask 255.255.255.224 {
#  range dynamic-bootp 10.254.239.40 10.254.239.60;
#  option broadcast-address 10.254.239.31;
#  option routers rtr-239-32-1.example.org;
#}

# A slightly different configuration for an internal subnet.
#subnet 10.5.5.0 netmask 255.255.255.224 {
#  range 10.5.5.26 10.5.5.30;
#  option domain-name-servers ns1.internal.example.org;
#  option domain-name "internal.example.org";
#  option routers 10.5.5.1;
#  option broadcast-address 10.5.5.31;
#  default-lease-time 600;
#  max-lease-time 7200;
#}

# Hosts which require special configuration options can be listed in
# host statements.   If no address is specified, the address will be
# allocated dynamically (if possible), but the host-specific information
# will still come from the host declaration.

#host passacaglia {
#  hardware ethernet 0:0:c0:5d:bd:95;
#  filename "vmunix.passacaglia";
#  server-name "toccata.fugue.com";
#}

# Fixed IP addresses can also be specified for hosts.   These addresses
# should not also be listed as being available for dynamic assignment.
# Hosts for which fixed IP addresses have been specified can boot using
# BOOTP or DHCP.   Hosts for which no fixed address is specified can only
# be booted with DHCP, unless there is an address range on the subnet
# to which a BOOTP client is connected which has the dynamic-bootp flag
# set.
#host fantasia {
#  hardware ethernet 08:00:07:26:c0:a5;
#  fixed-address fantasia.fugue.com;
#}

# You can declare a class of clients and then do address allocation
# based on that.   The example below shows a case where all clients
# in a certain class get addresses on the 10.17.224/24 subnet, and all
# other clients get addresses on the 10.0.29/24 subnet.

#class "foo" {
#  match if substring (option vendor-class-identifier, 0, 4) = "SUNW";
#}

#shared-network 224-29 {
#  subnet 10.17.224.0 netmask 255.255.255.0 {
#    option routers rtr-224.example.org;
#  }
#  subnet 10.0.29.0 netmask 255.255.255.0 {
#    option routers rtr-29.example.org;
#  }
#  pool {
#    allow members of "foo";
#    range 10.17.224.10 10.17.224.250;
#  }
#  pool {
#    deny members of "foo";
#    range 10.0.29.10 10.0.29.230;
#  }
#}
# swisstrak
subnet 192.168.11.1 netmask 255.255.255.0 {
	range 192.168.11.10 192.168.11.25;
	}
# swisstrak
host chur {
	fixed-address 192.168.11.1;
	}
# Swisstrak
zone swisstrak. {
	primary 192.168.11.1;
	key ;
	}
Note the indentations in the code, these are required!

It's used in an LTSP environment, which I got working, in the end I'd suggest to copy/paste and alter to suit your environment.
 
Old 04-20-2012, 09:05 AM   #5
preacher
LQ Newbie
 
Registered: Mar 2012
Posts: 10

Original Poster
Rep: Reputation: Disabled
Thanks, but that still didn't seem to fix my starting problem
 
Old 04-20-2012, 09:48 AM   #6
Dutch Master
Senior Member
 
Registered: Dec 2005
Posts: 1,686

Rep: Reputation: 124Reputation: 124
Can you start it manually? If you try and it fails, what error message do you get? If it works, you need to create a startup script in the appropriate dir's. (/etc/rcX.d, in fact symlinks as explained in /etc/init.d/README)
 
Old 04-20-2012, 01:02 PM   #7
preacher
LQ Newbie
 
Registered: Mar 2012
Posts: 10

Original Poster
Rep: Reputation: Disabled
I tried running mannually from the command line with and without an interface argument and it still fails with the same error message below. I was thinking about removing the binary and installing from source?!?

r 20 09:47:00 BigDog dhcpd: Wrote 0 leases to leases file.
Apr 20 09:47:00 BigDog dhcpd:
Apr 20 09:47:00 BigDog dhcpd: No subnet declaration for eth0 (192.168.0.10).
Apr 20 09:47:00 BigDog dhcpd: ** Ignoring requests on eth0. If this is not what
Apr 20 09:47:00 BigDog dhcpd: you want, please write a subnet declaration
Apr 20 09:47:00 BigDog dhcpd: in your dhcpd.conf file for the network segment
Apr 20 09:47:00 BigDog dhcpd: to which interface eth0 is attached. **
Apr 20 09:47:00 BigDog dhcpd:
Apr 20 09:47:00 BigDog dhcpd:
Apr 20 09:47:00 BigDog dhcpd: Not configured to listen on any interfaces!
 
Old 04-20-2012, 03:39 PM   #8
Dutch Master
Senior Member
 
Registered: Dec 2005
Posts: 1,686

Rep: Reputation: 124Reputation: 124
No, no need to. The cause is in the error message: you need to write a subnet declaration for eth0.

Post your dhcpd.conf (use the code tags, like I did!) so we can see what's in there (and more importantly, what's not!)
 
Old 04-21-2012, 08:14 AM   #9
preacher
LQ Newbie
 
Registered: Mar 2012
Posts: 10

Original Poster
Rep: Reputation: Disabled
Ok, here is my dhcpd.conf file as it is now. To be totally honest, I'm not sure what's in it or not in it anymore...i've racked my brain trying so many different things! I'm willing to walk through if we can figure it out. Right now, my tolerance for dhcpd is getting LOW!

THANKS!!

Code:
#
# Sample configuration file for ISC dhcpd for Debian
#
#

# The ddns-updates-style parameter controls whether or not the server will
# attempt to do a DNS update when a lease is confirmed. We default to the
# behavior of the version 2 packages ('none', since DHCP v2 didn't
# have support for DDNS.)
ddns-update-style none;

# option definitions common to all supported networks...
option domain-name "swisstrak.org";

default-lease-time 600;
max-lease-time 7200;

# If this DHCP server is the official DHCP server for the local
# network, the authoritative directive should be uncommented.
#authoritative;

# Use this to send dhcp log messages to a different log file (you also
# have to hack syslog.conf to complete the redirection).
log-facility local7;

# No service will be given on this subnet, but declaring it helps the 
# DHCP server to understand the network topology.

#subnet 192.168.0.0 netmask 255.255.255.0 {
#}

# This is a very basic subnet declaration.

#subnet 192.168.0.0 netmask 255.255.255.0 {
#  range 10.254.239.10 10.254.239.20;
#  option routers rtr-239-0-1.example.org, rtr-239-0-2.example.org;
#}

# This declaration allows BOOTP clients to get dynamic addresses,
# which we don't really recommend.

#subnet 10.254.239.32 netmask 255.255.255.224 {
#  range dynamic-bootp 10.254.239.40 10.254.239.60;
#  option broadcast-address 10.254.239.31;
#  option routers rtr-239-32-1.example.org;
#}

# A slightly different configuration for an internal subnet.
#subnet 10.5.5.0 netmask 255.255.255.224 {
#  range 10.5.5.26 10.5.5.30;
#  option domain-name-servers ns1.internal.example.org;
#  option domain-name "internal.example.org";
#  option routers 10.5.5.1;
#  option broadcast-address 10.5.5.31;
#  default-lease-time 600;
#  max-lease-time 7200;
#}

# Hosts which require special configuration options can be listed in
# host statements.   If no address is specified, the address will be
# allocated dynamically (if possible), but the host-specific information
# will still come from the host declaration.

#host passacaglia {
#  hardware ethernet 0:0:c0:5d:bd:95;
#  filename "vmunix.passacaglia";
#  server-name "toccata.fugue.com";
#}

# Fixed IP addresses can also be specified for hosts.   These addresses
# should not also be listed as being available for dynamic assignment.
# Hosts for which fixed IP addresses have been specified can boot using
# BOOTP or DHCP.   Hosts for which no fixed address is specified can only
# be booted with DHCP, unless there is an address range on the subnet
# to which a BOOTP client is connected which has the dynamic-bootp flag
# set.
#host fantasia {
#  hardware ethernet 08:00:07:26:c0:a5;
#  fixed-address fantasia.fugue.com;
#}

# You can declare a class of clients and then do address allocation
# based on that.   The example below shows a case where all clients
# in a certain class get addresses on the 10.17.224/24 subnet, and all
# other clients get addresses on the 10.0.29/24 subnet.

#class "foo" {
#  match if substring (option vendor-class-identifier, 0, 4) = "SUNW";
#}

#shared-network 224-29 {
#  subnet 10.17.224.0 netmask 255.255.255.0 {
#    option routers rtr-224.example.org;
#  }
#  subnet 10.0.29.0 netmask 255.255.255.0 {
#    option routers rtr-29.example.org;
#  }
#  pool {
#    allow members of "foo";
#    range 10.17.224.10 10.17.224.250;
#  }
#  pool {
#    deny members of "foo";
#    range 10.0.29.10 10.0.29.230;
#  }
#}
# swisstrak
subnet 192.168.0.0 netmask 255.255.255.0 {
	range 192.168.0.15 192.168.0.35;
	}
# swisstrak
host chur {
	fixed-address 192.168.11.1;
	}
# Swisstrak
zone swisstrak. {
	primary 192.168.11.1;
	key ;
	}
 
Old 04-21-2012, 08:39 AM   #10
fukawi1
Member
 
Registered: Apr 2009
Location: Melbourne
Distribution: Fedora & CentOS
Posts: 854

Rep: Reputation: 193Reputation: 193
Quote:
Originally Posted by preacher View Post
Apr 20 09:47:00 BigDog dhcpd: Not configured to listen on any interfaces!
Well one error at least, is right there in front of you.

If you are running from the commandline, running "dhcpd -d -f ethx" should work, and also give you additional debug info, and run it in the foreground so everything is logged to stdout. If you were using CentOS I would suggest you need to configure /etc/sysconfig/dhcpd to include the interfaces you want dhcpd to listen on.

Aside from that, your subnet declarations are missing the "option routers" and "option subnet-mask" directives at the very least..
 
Old 04-21-2012, 09:01 AM   #11
preacher
LQ Newbie
 
Registered: Mar 2012
Posts: 10

Original Poster
Rep: Reputation: Disabled
I'm using Ubuntu 11.10, the other day I tried running from the command line with the switches you recommended and got failure there as well. Of course I've gone through so many dhcpd.conf files and don't know which one was used at the time. I do know that in most cases, I tried to pretty conscious. I'll adjust and see.
 
Old 04-21-2012, 09:18 AM   #12
Dutch Master
Senior Member
 
Registered: Dec 2005
Posts: 1,686

Rep: Reputation: 124Reputation: 124
Right, you've just copy/pasted my config file, w/o altering it to your situation... I'll take out a lot of the comments, to let you see what's changed/important. As I have no clue how your zone is named, I'll use the "BigDog" name that came from your own post


Code:
#
# Sample configuration file for ISC dhcpd for Debian
#
#

ddns-update-style none;

# option definitions common to all supported networks...
option domain-name "BigDog.org";

default-lease-time 600;
max-lease-time 7200;

# Use this to send dhcp log messages to a different log file (you also
# have to hack syslog.conf to complete the redirection).
log-facility local7;

# declaration for network: BigDog
subnet 192.168.0.0 netmask 255.255.255.0 {
	range 192.168.1.11 192.168.1.35;
        option routers 192.168.1.1;
        option subnet-mask 255.255.255.0;
	}
# hostname for dhcp server BigDog
host BigDog {
	fixed-address 192.168.1.10;
	}
# zone name: BigDog
zone BigDog. {
	primary 192.168.1.10;
	key ;
	}
I added some options as noted by fukawi1 to complete the config file. Note the IP addresses: they're now in the 192.168.1.1 range. However, that may clash with your LAN setup (make sure you're either on a separate network from your LAN, or stop any other dhcp server in your LAN (router!))
 
Old 04-21-2012, 05:58 PM   #13
preacher
LQ Newbie
 
Registered: Mar 2012
Posts: 10

Original Poster
Rep: Reputation: Disabled
ARG!

Still no cigar! I tried running dhcpd both with the file you sent (as is) and then after altering it to reflect a 192.168.0.0 subnet. The actual subnet is 192.168.0.0. I have no other dhcpd on the LAN and the gateway/router is 192.168.0.2. I'm using another Linux box (Fedora) as the GW/ROUTER. I also added a broadcast line to my /etc/network/interfaces file under the eth0 entry which reflects 192.168.0.255.

All of these things result in the same error message (above). And go figure, all these years people have been telling me how simple Ubuntu is!!!!!!!!!!!!!!!!

Thanks for all you've offered!
 
Old 04-21-2012, 07:58 PM   #14
Dutch Master
Senior Member
 
Registered: Dec 2005
Posts: 1,686

Rep: Reputation: 124Reputation: 124
Sorry to hear that... Last resort: install Webmin. It allows you to configure the box in a GUI via a web browser. More on http://www.webmin.com/ After installation, browse to https://localhost:10000 then log in as root. In the menu (left) head for "servers" then take it from there
 
Old 04-21-2012, 08:52 PM   #15
fukawi1
Member
 
Registered: Apr 2009
Location: Melbourne
Distribution: Fedora & CentOS
Posts: 854

Rep: Reputation: 193Reputation: 193
Is there a reason not to run DHCP on the router? This is the more logical place to put it.

Quote:
All of these things result in the same error message (above). And go figure, all these years people have been telling me how simple Ubuntu is
The error message is telling you what the problem is. As I said in my earlier post, you need to tell dhcpd to listen on an interface.
Quote:
If you are running from the commandline, running "dhcpd -d -f ethx" should work, and also give you additional debug info, and run it in the foreground so everything is logged to stdout
I should also add, you really shouldn't be using Fedora on a server.
See this for why:
http://www.linuxquestions.org/questi...centos-935987/

Last edited by fukawi1; 04-21-2012 at 09:03 PM.
 
  


Reply



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
could not start dhcpd windstory Linux - Newbie 2 08-22-2011 11:29 AM
DHCPD will start in debug but will not start as a normal service jwsnl Linux - Server 3 06-07-2010 06:47 AM
dhcpd fails to update dns on Debian Lenny GordonCNorris Linux - Server 0 07-08-2009 09:28 AM
dhcpd can not start vito_huang Linux - Networking 2 02-15-2005 03:41 PM
dhcpd will not start odious1 Linux - Networking 1 04-08-2004 03:13 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 12:49 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