I set up debian as a router and I have everything working except the DHCP server. eth0 is connected to the local network and eth1 is connected to my cable modem. When I try to start dhcp I get
moe-server:~# /etc/init.d/dhcp start
Starting DHCP server: dhcpd failed to start - check syslog for diagnostics.
/var/log/daemon.org says:
Jul 25 23:48:03 localhost dhcpd: No subnet declaration for eth1 (xxx.xxx.xxx.xxx).
Jul 25 23:48:03 localhost dhcpd: Please write a subnet declaration in your dhcpd.conf file for the
Jul 25 23:48:03 localhost dhcpd: network segment to which interface eth1 is attached.
Jul 25 23:48:03 localhost dhcpd: exiting.
I don't understand why DHCP should have to know anything about eth1 because I'm only assigning IP addresses to my local network on eth0.
my /etc/init.d/dhcp has the line INTERFACES="eth0"
my /etc/dhcpd.conf looks like:
Code:
authoritative;
ddns-update-style interim;
default-lease-time 259200;
max-lease-time 518400;
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.1.255;
option routers 192.168.1.1;
option domain-name-servers 192.168.1.1;
option netbios-name-servers 192.168.1.1;
subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.100 192.168.1.250;
}
/etc/network/interfaces
Code:
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto eth0
iface eth0 inet static
name Local Ethernet LAN card
address 192.168.1.1
netmask 255.255.255.0
broadcast 192.168.1.255
network 192.168.1.0
gateway 192.168.1.1
iface eth1 inet dhcp
name Ethernet LAN card (WAN)
auto eth1