Strange behaivior of dhcpd

Bachman Kharazmi bkw at lindesign.se
Tue Jan 6 10:14:04 GMT 2004


hi

I'am running isc-dhcpd-V3.0pl2.
There seem to be issues during the startup of dhcpd when I boot my machine.

I've "rm /var/run/* /var/lock/*" in /etc/init.d/bootmisc so I'am certain there there's nothing left after a reboot cause /var/run and and /var/lock are partitions that got remounted after every reboot, but to make sure...


When /etc/init.d/dhcpd tries to start I get this in messages.

----------------------

Jan  6 09:16:28 tellus dhcpd: Wrote 2 leases to leases file.
Jan  6 09:16:28 tellus dhcpd: There's already a DHCP server running.
Jan  6 09:16:28 tellus dhcpd: 
Jan  6 09:16:28 tellus dhcpd: If you did not get this software from ftp.isc.org, please
Jan  6 09:16:28 tellus dhcpd: get the latest from ftp.isc.org and install that before
Jan  6 09:16:28 tellus dhcpd: requesting help.
Jan  6 09:16:28 tellus dhcpd: 
Jan  6 09:16:28 tellus dhcpd: If you did get this software from ftp.isc.org and have not
Jan  6 09:16:28 tellus dhcpd: yet read the README, please read it before requesting help.
Jan  6 09:16:28 tellus dhcpd: If you intend to request help from the dhcp-server at isc.org
Jan  6 09:16:28 tellus dhcpd: mailing list, please read the section on the README about
Jan  6 09:16:28 tellus dhcpd: submitting bug reports and requests for help.
Jan  6 09:16:28 tellus dhcpd: 
Jan  6 09:16:28 tellus dhcpd: Please do not under any circumstances send requests for
Jan  6 09:16:28 tellus dhcpd: help directly to the authors of this software - please
Jan  6 09:16:28 tellus dhcpd: send them to the appropriate mailing list as described in
Jan  6 09:16:28 tellus dhcpd: the README file.
----------------------------------------
and there's no dhcpd -q eth0 running when I do ps ax | grep dhcpd :/

how can the log say there's already a dhcpd running ?

I donno if dhcpd.leases has to do with this. but I guess only /var/run/dhcpd.pid can cause such msg.

There's a /var/run/dhcpd.pid that say:

root at tellus /var/run # ls -al
total 32
drwxrwxrwt    2 root     root          220 Jan  6 09:25 .
drwxr-xr-x   14 root     root         4096 Jan  6 09:16 ..
-rw-r--r--    1 root     root            5 Jan  6 09:25 dhclient-eth1.pid
-rw-r--r--    1 root     root            0 Jan  6 09:16 dhcpd.pid

so it has to be created from somewhere after /var/run and /var/lock are remounted and even cleant by hand from bootmisc.


my dhcpd.conf say:
--------------------
ddns-update-style interim;
subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.2 192.168.1.5;
option domain-name-servers 10.130.1.2, 10.251.63.240;
option domain-name "lan";
option routers 192.168.1.1;
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.1.255;

#lease times
default-lease-time 86400;
max-lease-time 2592000;

----------------------

I'am running same machine as fw that might be a fact that it cant start if the proper settings isn't set.

my fw lines look like.
$IPTABLES -A udpincoming_packets -i $LAN_IFACE -p UDP -s 0/0 --dport 67:68 -j ACCEPT
$IPTABLES -A udpincoming_packets -i $LAN_IFACE -p UDP -s 0/0 --source-port 67:68 -j ACCEPT

iptables -L -n:
Chain udpincoming_packets (2 references)
target     prot opt source               destination         
ACCEPT     udp  --  0.0.0.0/0            0.0.0.0/0           udp dpts:67:68 
ACCEPT     udp  --  0.0.0.0/0            0.0.0.0/0           udp spts:67:68 

and I would like to show the behaivior of the the dhcpd.leases too.
lease 192.168.1.2 {
  starts 1 2004/01/05 12:41:03;
  ends 2 2004/01/06 12:41:03;
  tstp 2 2004/01/06 12:41:03;
  binding state active;
  next binding state free;
  hardware ethernet 00:0c:6e:80:67:3e;
  uid "\001\000\014n\200g>";
  client-hostname "pluto";
}
lease 192.168.1.5 {
  starts 1 2004/01/05 23:12:03;
  ends 2 2004/01/06 23:12:03;
  tstp 2 2004/01/06 23:12:03;
  binding state active;
  next binding state free;
  hardware ethernet 00:03:93:49:60:44;
  uid "\001\000\003\223I`D";
}

I guess there's something strange. after a lease of 192.168.1.2 it's supposed to be .3 etc -> .5  ?





I can start my dhcpd manually if I remove /var/run/dhcpd.pid by hand and then do /etc/init.d/dhcpd start.

then it works fine.
1742 ?        S      0:00 /usr/sbin/dhcpd -q eth0


Thanks for all replys
/bkw


-- 
##############################
# BKW - Bachman Kharazmi     #
# cellphone: +46 707 310 886 #
# bkw at lindesign.se	     #
# uin: #24089491	     #
# Malmö - Sweden	     #
##############################
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lunar-linux.org/pipermail/lunar/attachments/20040106/c674c1a2/attachment.bin


More information about the Lunar mailing list