[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

dhcp not starting since a couple of days



Hi,

DHCP seems to be giving some problems since a couple of days.

The problem started when I noticed that it wasn't starting on boot up and I was getting this in my syslog file:
#--------------------------------------------
dhcpd: No subnet declaration for eth1 (192.168.1.1).
dhcpd: Please write a subnet declaration in your dhcpd.conf file for the
dhcpd: network segment to which interface eth1 is attached.
dhcpd: exiting.
#--------------------------------------------

I am using this machine of mine to connect to an ADSL modem through eth1 (IP 192.168.1.1) and to my LAN switch through eth0(IP 192.168.0.2). I was not sure why this error starting coming up. I searched google and newsgoups and figured I need to tell dhcp that my eth1 is not to be entertained, only eth0. So I put these lines in /etc/dhcpd.conf (below my earlier configuration lines):
#--------------------------------------------
subnet 192.168.1.0 netmask 255.255.255.0 {
  not authoritative;
}
#--------------------------------------------

Then "/etc/init.d/dhcp start" gave no errors, dhcpd started, but my LAN computer (running Sid) couldn't find any dhcp IP address.

Then I changed the above lines to :
#--------------------------------------------
subnet 192.168.1.0 netmask 255.255.255.0 { }
#--------------------------------------------

with the same results: dhcpd was working but the LAN computer couldn't find any IP address.


Then I stopped the dhcpd and started it as root:
#--------------------------------------------
#> dhcpd
Internet Software Consortium DHCP Server 2.0pl5
Copyright 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium.
All rights reserved.

Please contribute if you find this software useful.
For info, please visit http://www.isc.org/dhcp-contrib.html

Listening on LPF/eth1/00:04:75:8a:d6:df/192.168.1.0
Sending on   LPF/eth1/00:04:75:8a:d6:df/192.168.1.0
Listening on LPF/eth0/00:50:ba:50:03:87/192.168.0.0
Sending on   LPF/eth0/00:50:ba:50:03:87/192.168.0.0
Sending on   Socket/fallback/fallback-net
#--------------------------------------------


and the LAN computer got the IP immediately.

So basically, if I start dhcp from it's /etc/init.d/dhcp script, it doesn't work. But if I start dhcpd from command line, it does.

1) Why so? Is there a problem in /etc/init.d/dhcp that came up during a recent upgrade?


2) From the above output, I know that dhcp shouldn't be listening on eth1, so "dhcpd eth0" as root listens and sends only on eth0. I tried this and it works too, but how to I tell dhcp to use eth0 only when it starts at boot automatically?

Thanks,
->HS



Reply to: