DebianThis forum is for the discussion of Debian Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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.
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)
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!
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 ;
}
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..
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.
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!))
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!!!!!!!!!!!!!!!!
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
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
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.