I'm trying to configure a dhcp server on my Debian computer in order to run a tftp server. I have 1 nic which is eth0. I followed several tutorials but none of them worked with me. I installed dhcp3-server and this is my /etc/dhcp3/dhcpd.conf file:
subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.10 192.168.1.100;
option domain-name-servers 192.168.1.1;
option netbios-name-servers 192.168.1.1;
option routers 192.168.1.1;
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.1.255;
default-lease-time 86400;
max-lease-time 676800;
}
I do not need a very complicated nor secure configuration. All I need is that all the computer connected to the network will get an ip address through the dhcp server. I don't even need the service to start at startup as I'll be using it occasionally only. The network doesn't have any other dhcp server running. The problem is I can't start the service and when I have a look at /var/log/syslog, I get this error:
Nov 17 19:15:58 debian dhcpd: Not configured to listen on any interfaces!
Nov 17 19:17:01 debian /USR/SBIN/CRON[2311]: (root) CMD ( cd / && run-parts --report /etc/cron.hourly)
Nov 17 19:18:43 debian dhcpd: Internet Systems Consortium DHCP Server 4.1.1-P1
Nov 17 19:18:43 debian dhcpd: Copyright 2004-2010 Internet Systems Consortium.
Nov 17 19:18:43 debian dhcpd: All rights reserved.
Nov 17 19:18:43 debian dhcpd: For info, please visit https://www.isc.org/software/dhcp/
Nov 17 19:18:43 debian dhcpd: Internet Systems Consortium DHCP Server 4.1.1-P1
Nov 17 19:18:43 debian dhcpd: Copyright 2004-2010 Internet Systems Consortium.
Nov 17 19:18:43 debian dhcpd: All rights reserved.
Nov 17 19:18:43 debian dhcpd: For info, please visit https://www.isc.org/software/dhcp/
Nov 17 19:18:43 debian dhcpd: Wrote 0 leases to leases file.
Nov 17 19:18:43 debian dhcpd:
Nov 17 19:18:43 debian dhcpd: No subnet declaration for eth0 (192.168.1.27).
Nov 17 19:18:43 debian dhcpd: ** Ignoring requests on eth0. If this is not what
Nov 17 19:18:43 debian dhcpd: you want, please write a subnet declaration
Nov 17 19:18:43 debian dhcpd: in your dhcpd.conf file for the network segment
Nov 17 19:18:43 debian dhcpd: to which interface eth0 is attached. **
Nov 17 19:18:43 debian dhcpd:
Nov 17 19:18:43 debian dhcpd:
Nov 17 19:18:43 debian dhcpd: Not configured to listen on any interfaces!
I don't know if you need it but here is my ifconfig output:
eth0 Link encap:Ethernet HWaddr f0:4d:a2:f1:38:dc
inet addr:192.168.1.27 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: 2a01:e35:8bb7:2480:f24d:a2ff:fef1:38dc/64 Scope:Global
inet6 addr: fe80::f24d:a2ff:fef1:38dc/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:2733 errors:0 dropped:0 overruns:0 frame:0
TX packets:2697 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:1110122 (1.0 MiB) TX bytes:476771 (465.5 KiB)
Interrupt:18
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:126 errors:0 dropped:0 overruns:0 frame:0
TX packets:126 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:7884 (7.6 KiB) TX bytes:7884 (7.6 KiB)